]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Dispatcher.c
index fb224f4ad36b7f75d8594e9237703fb511738ac3..2e2a66432cd1a6e4f29c7d55e1f9237b97ee290b 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Tcp request dispatcher implementation.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2010, 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
 http://opensource.org/licenses/bsd-license.php<BR>\r
@@ -52,7 +52,7 @@ Tcp4Route (
               RouteInfo->SubnetMask,\r
               RouteInfo->GatewayAddress\r
               );\r
-              \r
+\r
 }\r
 \r
 \r
@@ -227,14 +227,16 @@ Tcp4FlushPcb (
     RemoveEntryList (&Tcb->List);\r
 \r
     //\r
-    // Uninstall the device path protocl.\r
+    // Uninstall the device path protocol.\r
     //\r
-    gBS->UninstallProtocolInterface (\r
-           Sock->SockHandle,\r
-           &gEfiDevicePathProtocolGuid,\r
-           Sock->DevicePath\r
-           );\r
-    gBS->FreePool (Sock->DevicePath);\r
+    if (Sock->DevicePath != NULL) {\r
+      gBS->UninstallProtocolInterface (\r
+             Sock->SockHandle,\r
+             &gEfiDevicePathProtocolGuid,\r
+             Sock->DevicePath\r
+             );\r
+      FreePool (Sock->DevicePath);\r
+    }\r
 \r
     TcpSetVariableData (TcpProto->TcpService);\r
   }\r
@@ -247,7 +249,7 @@ Tcp4FlushPcb (
   Attach a Pcb to the socket.\r
 \r
   @param  Sk                     Pointer to the socket of this TCP instance.\r
-  \r
+\r
   @retval EFI_SUCCESS            The operation is completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES   Failed due to resource limit.\r
 \r
@@ -279,7 +281,7 @@ Tcp4AttachPcb (
   Tcb->IpInfo = IpIoAddIp (IpIo);\r
   if (Tcb->IpInfo == NULL) {\r
 \r
-    gBS->FreePool (Tcb);\r
+    FreePool (Tcb);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -298,7 +300,7 @@ Tcp4AttachPcb (
   Detach the Pcb of the socket.\r
 \r
   @param  Sk                     Pointer to the socket of this TCP instance.\r
-  \r
+\r
 **/\r
 VOID\r
 Tcp4DetachPcb (\r
@@ -317,7 +319,7 @@ Tcp4DetachPcb (
 \r
   IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);\r
 \r
-  gBS->FreePool (Tcb);\r
+  FreePool (Tcb);\r
 \r
   ProtoData->TcpPcb = NULL;\r
 }\r
@@ -530,15 +532,15 @@ Tcp4ConfigurePcb (
                             (UINT32) (Option->ConnectionTimeout * TCP_TICK_HZ)\r
                             );\r
 \r
-    if (Option->EnableNagle == FALSE) {\r
+    if (!Option->EnableNagle) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_NAGLE);\r
     }\r
 \r
-    if (Option->EnableTimeStamp == FALSE) {\r
+    if (!Option->EnableTimeStamp) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_TS);\r
     }\r
 \r
-    if (Option->EnableWindowScaling == FALSE) {\r
+    if (!Option->EnableWindowScaling) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_WS);\r
     }\r
   }\r
@@ -555,7 +557,7 @@ Tcp4ConfigurePcb (
   //\r
   // update state of Tcb and socket\r
   //\r
-  if (CfgData->AccessPoint.ActiveFlag == FALSE) {\r
+  if (!CfgData->AccessPoint.ActiveFlag) {\r
 \r
     TcpSetState (Tcb, TCP_LISTEN);\r
     SockSetState (Sk, SO_LISTENING);\r