summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
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/SockInterface.c
parent80ae1cc7004d6667850d829adc4dc7708816a5a6 (diff)
downloadedk2-platforms-54ea3ede85dc9063bb860d6bbc78d0ae1a1ce142.tar.xz
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/SockInterface.c')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
index f512e4eacf..d17bfa8b9d 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;
}