summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe
diff options
context:
space:
mode:
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-28 07:27:48 +0000
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-28 07:27:48 +0000
commit54ea3ede85dc9063bb860d6bbc78d0ae1a1ce142 (patch)
tree39385ae3b1c1364e754bc8dcca2a84c9df32c421 /MdeModulePkg/Universal/Network/Tcp4Dxe
parent80ae1cc7004d6667850d829adc4dc7708816a5a6 (diff)
downloadedk2-54ea3ede85dc9063bb860d6bbc78d0ae1a1ce142.zip
edk2-54ea3ede85dc9063bb860d6bbc78d0ae1a1ce142.tar.gz
edk2-54ea3ede85dc9063bb860d6bbc78d0ae1a1ce142.tar.bz2
1. Update error handling code if failing attach socket with new PCB.
2. Set TCP state to Tcp4StateClosed after Configure called with NULL. Signed-off-by: tye Reviewed-by: xdu2 Reviewed-by: qouyang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c4
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
index f512e4e..d17bfa8 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
@@ -1,7 +1,7 @@
/** @file
Interface function of the Socket.
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -237,6 +237,7 @@ SockCreateChild (
// with a new protocol control block
//
Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL);
+ EfiReleaseLock (&(Sock->Lock));
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "SockCreateChild: Protocol failed to"
@@ -246,7 +247,6 @@ SockCreateChild (
Sock = NULL;
}
- EfiReleaseLock (&(Sock->Lock));
return Sock;
}
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
index 536a16a..f86e5c2 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
@@ -1,7 +1,7 @@
/** @file
Tcp request dispatcher implementation.
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -243,6 +243,7 @@ Tcp4FlushPcb (
NetbufFreeList (&Tcb->SndQue);
NetbufFreeList (&Tcb->RcvQue);
+ Tcb->State = TCP_CLOSED;
}
/**