diff options
author | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-10 19:04:41 +0000 |
---|---|---|
committer | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-10 19:04:41 +0000 |
commit | 884ed923564f35084c45a8f3f132c076b26f2423 (patch) | |
tree | 6707946f9ce230340165c0da4cf83b31270fa114 /StdLib/EfiSocketLib/Ip4.c | |
parent | 44890dbde6b2a70348787d81885012583ed4a5dd (diff) | |
download | edk2-platforms-884ed923564f35084c45a8f3f132c076b26f2423.tar.xz |
Modify UDP and IP to transmit on all network adapters instead of just the first network adapter.
Fix comment in Socket.c.
Signed-off-by: lpleahy
Reviewed and tested by: Sreenivasula Reddy of Dell
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13713 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/EfiSocketLib/Ip4.c')
-rw-r--r-- | StdLib/EfiSocketLib/Ip4.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c index a245e6847e..2e832c7ac9 100644 --- a/StdLib/EfiSocketLib/Ip4.c +++ b/StdLib/EfiSocketLib/Ip4.c @@ -985,21 +985,21 @@ EslIp4TxBuffer ( //
if ( SOCKET_STATE_CONNECTED == pSocket->State ) {
//
- // Locate the port
+ // Verify that there is enough room to buffer another
+ // transmit operation
//
- pPort = pSocket->pPortList;
- if ( NULL != pPort ) {
+ pTxBytes = &pSocket->TxBytes;
+ if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
- // Determine the queue head
+ // Locate the port
//
- pIp4 = &pPort->Context.Ip4;
- pTxBytes = &pSocket->TxBytes;
+ pPort = pSocket->pPortList;
+ while ( NULL != pPort ) {
+ //
+ // Determine the queue head
+ //
+ pIp4 = &pPort->Context.Ip4;
- //
- // Verify that there is enough room to buffer another
- // transmit operation
- //
- if ( pSocket->MaxTxBuf > *pTxBytes ) {
//
// Attempt to allocate the packet
//
@@ -1131,6 +1131,7 @@ EslIp4TxBuffer ( // Free the packet
//
EslSocketPacketFree ( pPacket, DEBUG_TX );
+ break;
}
//
@@ -1143,16 +1144,22 @@ EslIp4TxBuffer ( // Packet allocation failed
//
pSocket->errno = ENOMEM;
+ break;
}
- }
- else {
+
//
- // Not enough buffer space available
+ // Set the next port
//
- pSocket->errno = EAGAIN;
- Status = EFI_NOT_READY;
+ pPort = pPort->pLinkSocket;
}
}
+ else {
+ //
+ // Not enough buffer space available
+ //
+ pSocket->errno = EAGAIN;
+ Status = EFI_NOT_READY;
+ }
}
//
|