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
This commit is contained in:
tye1 2011-10-28 07:27:48 +00:00
parent 80ae1cc700
commit 54ea3ede85
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Interface function of the Socket. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 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 // with a new protocol control block
// //
Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL); Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL);
EfiReleaseLock (&(Sock->Lock));
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "SockCreateChild: Protocol failed to" DEBUG ((EFI_D_ERROR, "SockCreateChild: Protocol failed to"
@ -246,7 +247,6 @@ SockCreateChild (
Sock = NULL; Sock = NULL;
} }
EfiReleaseLock (&(Sock->Lock));
return Sock; return Sock;
} }

View File

@ -1,7 +1,7 @@
/** @file /** @file
Tcp request dispatcher implementation. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -243,6 +243,7 @@ Tcp4FlushPcb (
NetbufFreeList (&Tcb->SndQue); NetbufFreeList (&Tcb->SndQue);
NetbufFreeList (&Tcb->RcvQue); NetbufFreeList (&Tcb->RcvQue);
Tcb->State = TCP_CLOSED;
} }
/** /**