]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
MdeModulePkg/Universal: Fix typos in comments
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / SockImpl.c
index dad64ae447d251ead855d39de0e3b9efcba91aed..fc7827325f72fb9e4bdc117a8f926e3a2ff76ee5 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Implementation of the Socket.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2016, 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
@@ -33,7 +33,7 @@ SockTcpDataToRcv (
      OUT BOOLEAN        *IsUrg,\r
   IN     UINT32         BufLen\r
   );\r
-  \r
+\r
 /**\r
   Process the send token.\r
 \r
@@ -49,9 +49,10 @@ SockProcessSndToken (
   Supporting function for both SockImpl and SockInterface.\r
 \r
   @param Event             The Event this notify function registered to, ignored.\r
-  \r
+\r
 **/\r
 VOID\r
+EFIAPI\r
 SockFreeFoo (\r
   IN EFI_EVENT Event\r
   )\r
@@ -149,7 +150,7 @@ SockTcpDataToRcv (
   @param  Sock                  Pointer to the socket.\r
   @param  TcpRxData             Pointer to the application provided receive buffer.\r
   @param  RcvdBytes             The maximum length of the data can be copied.\r
-  @param  IsOOB                 If TURE the data is OOB, FALSE the data is normal.\r
+  @param  IsOOB                 If TRUE the data is OOB, FALSE the data is normal.\r
 \r
 **/\r
 VOID\r
@@ -321,7 +322,7 @@ SockProcessTcpSndData (
 \r
   @param  Sock                  Pointer to the socket.\r
   @param  PendingTokenList      Pointer to the token list to be flushed.\r
-  \r
+\r
 **/\r
 VOID\r
 SockFlushPendingToken (\r
@@ -345,13 +346,13 @@ SockFlushPendingToken (
     SIGNAL_TOKEN (Token, Sock->SockError);\r
 \r
     RemoveEntryList (&(SockToken->TokenList));\r
-    gBS->FreePool (SockToken);\r
+    FreePool (SockToken);\r
   }\r
 }\r
 \r
 \r
 /**\r
-  Wake up the connection token while the connection is successfully established, \r
+  Wake up the connection token while the connection is successfully established,\r
   then try to process any pending send token.\r
 \r
   @param  Sock                  Pointer to the socket.\r
@@ -407,12 +408,12 @@ SockWakeListenToken (
     SIGNAL_TOKEN (&(ListenToken->CompletionToken), EFI_SUCCESS);\r
 \r
     RemoveEntryList (&SockToken->TokenList);\r
-    gBS->FreePool (SockToken);\r
+    FreePool (SockToken);\r
 \r
     RemoveEntryList (&Sock->ConnectionList);\r
 \r
     Parent->ConnCnt--;\r
-    DEBUG ((EFI_D_INFO, "SockWakeListenToken: accept a socket, now conncnt is %d", Parent->ConnCnt));\r
+    DEBUG ((EFI_D_NET, "SockWakeListenToken: accept a socket, now conncnt is %d", Parent->ConnCnt));\r
 \r
     Sock->Parent = NULL;\r
   }\r
@@ -457,7 +458,7 @@ SockWakeRcvToken (
     }\r
 \r
     RemoveEntryList (&(SockToken->TokenList));\r
-    gBS->FreePool (SockToken);\r
+    FreePool (SockToken);\r
     RcvdBytes -= TokenRcvdBytes;\r
   }\r
 }\r
@@ -535,7 +536,7 @@ OnError:
 \r
   RemoveEntryList (&SockToken->TokenList);\r
   SIGNAL_TOKEN (SockToken->Token, Status);\r
-  gBS->FreePool (SockToken);\r
+  FreePool (SockToken);\r
 }\r
 \r
 \r
@@ -663,7 +664,7 @@ SockCreate (
     Parent->ConnCnt++;\r
 \r
     DEBUG (\r
-      (EFI_D_INFO,\r
+      (EFI_D_NET,\r
       "SockCreate: Create a new socket and add to parent, now conncnt is %d\n",\r
       Parent->ConnCnt)\r
       );\r
@@ -699,7 +700,7 @@ OnError:
     NetbufQueFree (Sock->RcvBuffer.DataQueue);\r
   }\r
 \r
-  gBS->FreePool (Sock);\r
+  FreePool (Sock);\r
 \r
   return NULL;\r
 }\r
@@ -738,7 +739,7 @@ SockDestroy (
 \r
   }\r
   //\r
-  // Destory the RcvBuffer Queue and SendBuffer Queue\r
+  // Destroy the RcvBuffer Queue and SendBuffer Queue\r
   //\r
   NetbufQueFree (Sock->RcvBuffer.DataQueue);\r
   NetbufQueFree (Sock->SndBuffer.DataQueue);\r
@@ -752,8 +753,8 @@ SockDestroy (
     (Sock->Parent->ConnCnt)--;\r
 \r
     DEBUG (\r
-      (EFI_D_INFO,\r
-      "SockDestory: Delete a unaccepted socket from parent"\r
+      (EFI_D_NET,\r
+      "SockDestroy: Delete a unaccepted socket from parent"\r
       "now conncnt is %d\n",\r
       Sock->Parent->ConnCnt)\r
       );\r
@@ -799,7 +800,7 @@ SockDestroy (
         );\r
 \r
 FreeSock:\r
-  gBS->FreePool (Sock);\r
+  FreePool (Sock);\r
   return ;\r
 }\r
 \r
@@ -932,10 +933,10 @@ SockClone (
 \r
 \r
 /**\r
-  Called by the low layer protocol to indicate the socket a connection is \r
-  established. \r
-  \r
-  This function just changes the socket's state to SO_CONNECTED \r
+  Called by the low layer protocol to indicate the socket a connection is\r
+  established.\r
+\r
+  This function just changes the socket's state to SO_CONNECTED\r
   and signals the token used for connection establishment.\r
 \r
   @param  Sock                  Pointer to the socket associated with the\r
@@ -963,13 +964,13 @@ SockConnEstablished (
 \r
 /**\r
   Called by the low layer protocol to indicate the connection is closed.\r
-  \r
-  This function flushes the socket, sets the state to SO_CLOSED and signals \r
+\r
+  This function flushes the socket, sets the state to SO_CLOSED and signals\r
   the close token.\r
 \r
   @param  Sock                  Pointer to the socket associated with the closed\r
                                 connection.\r
-                                \r
+\r
 **/\r
 VOID\r
 SockConnClosed (\r
@@ -993,8 +994,8 @@ SockConnClosed (
 \r
 /**\r
   Called by low layer protocol to indicate that some data is sent or processed.\r
-   \r
-  This function trims the sent data in the socket send buffer, signals the data \r
+\r
+  This function trims the sent data in the socket send buffer, signals the data\r
   token if proper.\r
 \r
   @param  Sock                  Pointer to the socket.\r
@@ -1032,7 +1033,7 @@ SockDataSent (
       RemoveEntryList (&(SockToken->TokenList));\r
       SIGNAL_TOKEN (SndToken, EFI_SUCCESS);\r
       Count -= SockToken->RemainDataLen;\r
-      gBS->FreePool (SockToken);\r
+      FreePool (SockToken);\r
     } else {\r
 \r
       SockToken->RemainDataLen -= Count;\r
@@ -1083,8 +1084,8 @@ SockGetDataToSend (
 \r
 /**\r
   Called by the low layer protocol to deliver received data to socket layer.\r
-  \r
-  This function will append the data to the socket receive buffer, set ther \r
+\r
+  This function will append the data to the socket receive buffer, set ther\r
   urgent data length and then check if any receive token can be signaled.\r
 \r
   @param  Sock                  Pointer to the socket.\r
@@ -1180,7 +1181,7 @@ SockRcvdErr (
 \r
     SIGNAL_TOKEN (SockToken->Token, Error);\r
 \r
-    gBS->FreePool (SockToken);\r
+    FreePool (SockToken);\r
   } else {\r
 \r
     SOCK_ERROR (Sock, Error);\r
@@ -1189,10 +1190,10 @@ SockRcvdErr (
 \r
 \r
 /**\r
-  Called by the low layer protocol to indicate that there will be no more data \r
+  Called by the low layer protocol to indicate that there will be no more data\r
   from the communication peer.\r
-  \r
-  This function set the socket's state to SO_NO_MORE_DATA and signal all queued \r
+\r
+  This function set the socket's state to SO_NO_MORE_DATA and signal all queued\r
   IO tokens with the error status EFI_CONNECTION_FIN.\r
 \r
   @param  Sock                  Pointer to the socket.\r
@@ -1256,7 +1257,7 @@ SockBufFirst (
   @param  SockEntry             Pointer to the buffer block prior to the required\r
                                 one.\r
 \r
-  @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is \r
+  @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is\r
           the tail or head entry.\r
 \r
 **/\r