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
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user