]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
MdeModulePkg: Fix service binding issue in TCP4 and Ip4 dxe.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / SockImpl.c
index fc7827325f72fb9e4bdc117a8f926e3a2ff76ee5..0476077c2019837884acf0ad99f268326a357bd7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of the Socket.\r
 \r
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -717,16 +717,8 @@ SockDestroy (
   IN OUT SOCKET *Sock\r
   )\r
 {\r
-  VOID        *SockProtocol;\r
-  EFI_GUID    *ProtocolGuid;\r
-  EFI_STATUS  Status;\r
-\r
   ASSERT (SockStream == Sock->Type);\r
 \r
-  if (Sock->DestroyCallback != NULL) {\r
-    Sock->DestroyCallback (Sock, Sock->Context);\r
-  }\r
-\r
   //\r
   // Flush the completion token buffered\r
   // by sock and rcv, snd buffer\r
@@ -762,44 +754,6 @@ SockDestroy (
     Sock->Parent = NULL;\r
   }\r
 \r
-  //\r
-  // Set the protocol guid and driver binding handle\r
-  // in the light of Sock->SockType\r
-  //\r
-  ProtocolGuid = &gEfiTcp4ProtocolGuid;\r
-\r
-  //\r
-  // Retrieve the protocol installed on this sock\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-                  Sock->SockHandle,\r
-                  ProtocolGuid,\r
-                  &SockProtocol,\r
-                  Sock->DriverBinding,\r
-                  Sock->SockHandle,\r
-                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-\r
-    DEBUG ((EFI_D_ERROR, "SockDestroy: Open protocol installed "\r
-      "on socket failed with %r\n", Status));\r
-\r
-    goto FreeSock;\r
-  }\r
-\r
-  //\r
-  // Uninstall the protocol installed on this sock\r
-  // in the light of Sock->SockType\r
-  //\r
-  gBS->UninstallMultipleProtocolInterfaces (\r
-        Sock->SockHandle,\r
-        ProtocolGuid,\r
-        SockProtocol,\r
-        NULL\r
-        );\r
-\r
-FreeSock:\r
   FreePool (Sock);\r
   return ;\r
 }\r