/** @file\r
Interface function of the Socket.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
}\r
\r
/**\r
- Destory the socket Sock and its associated protocol control block.\r
+ Destroy the socket Sock and its associated protocol control block.\r
\r
@param[in, out] Sock The socket to be destroyed.\r
\r
\r
ASSERT ((Sock != NULL) && (Sock->ProtoHandler != NULL));\r
\r
- if (Sock->IsDestroyed) {\r
+ if (Sock->InDestroy) {\r
return EFI_SUCCESS;\r
}\r
\r
- Sock->IsDestroyed = TRUE;\r
+ Sock->InDestroy = TRUE;\r
\r
Status = EfiAcquireLockOrFail (&(Sock->Lock));\r
if (EFI_ERROR (Status)) {\r
Status)\r
);\r
\r
- Sock->IsDestroyed = FALSE;\r
+ Sock->InDestroy = FALSE;\r
} else if (SOCK_IS_CONFIGURED (Sock)) {\r
\r
SockConnFlush (Sock);\r
// with a new protocol control block\r
//\r
Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL);\r
+ EfiReleaseLock (&(Sock->Lock));\r
if (EFI_ERROR (Status)) {\r
\r
DEBUG (\r
Sock = NULL;\r
}\r
\r
- EfiReleaseLock (&(Sock->Lock));\r
return Sock;\r
}\r
\r