summaryrefslogtreecommitdiff
path: root/AppPkg/Applications/Sockets/TftpServer
diff options
context:
space:
mode:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-30 23:04:13 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-30 23:04:13 +0000
commit59bc059327dd519619fa437c0d7c941e090cd8a3 (patch)
tree0159ec3a44a5b35410a156aba19f43ad9937cdb2 /AppPkg/Applications/Sockets/TftpServer
parenta88c31639bb24c73383a4528a5b77066e805148b (diff)
downloadedk2-platforms-59bc059327dd519619fa437c0d7c941e090cd8a3.tar.xz
Update the sockets applications
* Builds with GCC 4.4 compiler. Signed-off by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12498 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'AppPkg/Applications/Sockets/TftpServer')
-rw-r--r--AppPkg/Applications/Sockets/TftpServer/TftpServer.c9
-rw-r--r--AppPkg/Applications/Sockets/TftpServer/TftpServer.h18
2 files changed, 12 insertions, 15 deletions
diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
index 9b522d1b55..1da3c250d5 100644
--- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
+++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
@@ -846,8 +846,7 @@ Print ( L"TFTP Opcode: 0x%08x\r\n", Opcode );
bIgnorePacket = TRUE;
break;
}
- if ( pTftpServer->RxBytes > (ssize_t)( pContext->BlockSize + 2 + 2 ))
- {
+ if ( pTftpServer->RxBytes > (ssize_t)( pContext->BlockSize + 2 + 2 )) {
DEBUG (( DEBUG_ERROR,
"ERROR - Receive data length of %d > %d bytes (maximum block size) for pContext 0x%08x\r\n",
pTftpServer->RxBytes - 2 - 2,
@@ -1049,8 +1048,7 @@ pContext->File = (EFI_HANDLE)1;
"ACK for block 0x%04x received\r\n",
BlockNumber ));
if (( !pContext->bExpectAck )
- || ( BlockNumber != pContext->AckNext ))
- {
+ || ( BlockNumber != pContext->AckNext )) {
DEBUG (( DEBUG_WARN | DEBUG_TFTP_ACK,
"WARNING - Expecting ACK 0x%0x4 not received ACK 0x%08x\r\n",
pContext->AckNext,
@@ -1248,8 +1246,7 @@ TftpServerTimer (
pTftpServer->TftpPort.fd = socket ( AF_INET,
SOCK_DGRAM,
IPPROTO_UDP );
- if ( -1 != pTftpServer->TftpPort.fd )
- {
+ if ( -1 != pTftpServer->TftpPort.fd ) {
//
// Set the socket address
//
diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h b/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
index e56d21be78..b1e9f83ce5 100644
--- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
+++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
@@ -62,12 +62,12 @@
// Constants
//------------------------------------------------------------------------------
-#define DEBUG_SOCKET_POLL 0x40000000 ///< Display the socket poll messages
-#define DEBUG_PORT_WORK 0x20000000 ///< Display the port work messages
-#define DEBUG_SERVER_TIMER 0x10000000 ///< Display the socket poll messages
-#define DEBUG_TFTP_PORT 0x08000000 ///< Display the TFTP port messages
-#define DEBUG_TFTP_REQUEST 0x04000000 ///< Display the TFTP request messages
-#define DEBUG_TX 0x02000000 ///< Display transmit messages
+#define DEBUG_PORT_WORK 0x40000000 ///< Display the port work messages
+#define DEBUG_SERVER_TIMER 0x20000000 ///< Display the socket poll messages
+#define DEBUG_TFTP_PORT 0x10000000 ///< Display the TFTP port messages
+#define DEBUG_TFTP_REQUEST 0x08000000 ///< Display the TFTP request messages
+#define DEBUG_TX 0x04000000 ///< Display transmit messages
+#define DEBUG_SOCKET_POLL 0x02000000 ///< Display the socket poll messages
#define DEBUG_RX 0x01000000 ///< Display receive messages
#define DEBUG_TFTP_ACK 0x00800000 ///< Display the TFTP ACK messages
@@ -155,13 +155,13 @@ typedef struct _TSDT_CONNECTION_CONTEXT {
BOOLEAN bEofSent; ///< End of file sent
UINT8 * pBuffer; ///< Pointer into the file data
UINT8 * pEnd; ///< End of the file data
- UINT8 FileData [ 64 * TFTP_MAX_BLOCK_SIZE ]; ///< File data to send
+ UINT8 FileData[ 64 * TFTP_MAX_BLOCK_SIZE ]; ///< File data to send
//
// Buffer management
//
ssize_t TxBytes; ///< Bytes in the TX buffer
- UINT8 TxBuffer [ 2 + 2 + TFTP_MAX_BLOCK_SIZE ]; ///< Transmit buffer
+ UINT8 TxBuffer[ 2 + 2 + TFTP_MAX_BLOCK_SIZE ]; ///< Transmit buffer
}GCC_TSDT_CONNECTION_CONTEXT;
/**
@@ -188,7 +188,7 @@ typedef struct {
//
struct sockaddr_in RemoteAddress; ///< Remote address
ssize_t RxBytes; ///< Receive data length in bytes
- UINT8 RxBuffer [ 2 + 2 + TFTP_MAX_BLOCK_SIZE ]; ///< Receive buffer
+ UINT8 RxBuffer[ 2 + 2 + TFTP_MAX_BLOCK_SIZE ]; ///< Receive buffer
//
// Client port management