/** @file\r
Misc support routines for tcp.\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2009, 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
Clone->Sk = SockClone (Tcb->Sk);\r
if (Clone->Sk == NULL) {\r
DEBUG ((EFI_D_ERROR, "TcpCloneTcb: failed to clone a sock\n"));\r
- gBS->FreePool (Clone);\r
+ FreePool (Clone);\r
return NULL;\r
}\r
\r
);\r
}\r
\r
- gBS->FreePool (Tcp4Service->MacString);\r
+ FreePool (Tcp4Service->MacString);\r
}\r
\r
Tcp4Service->MacString = NewMacString;\r
\r
ON_ERROR:\r
\r
- gBS->FreePool (Tcp4VariableData);\r
+ FreePool (Tcp4VariableData);\r
\r
return Status;\r
}\r
NULL\r
);\r
\r
- gBS->FreePool (Tcp4Service->MacString);\r
+ FreePool (Tcp4Service->MacString);\r
Tcp4Service->MacString = NULL;\r
}\r
\r
TCP_CB *Tcb;\r
IPv4_DEVICE_PATH Ip4DPathNode;\r
EFI_STATUS Status;\r
+ TCP_PORTNO LocalPort;\r
+ TCP_PORTNO RemotePort;\r
\r
TcpProto = (TCP4_PROTO_DATA *) Sock->ProtoReserved;\r
TcpService = TcpProto->TcpService;\r
Tcb = TcpProto->TcpPcb;\r
\r
+ LocalPort = NTOHS (Tcb->LocalEnd.Port);\r
+ RemotePort = NTOHS (Tcb->RemoteEnd.Port);\r
NetLibCreateIPv4DPathNode (\r
&Ip4DPathNode,\r
TcpService->ControllerHandle,\r
Tcb->LocalEnd.Ip,\r
- NTOHS (Tcb->LocalEnd.Port),\r
+ LocalPort,\r
Tcb->RemoteEnd.Ip,\r
- NTOHS (Tcb->RemoteEnd.Port),\r
+ RemotePort,\r
EFI_IP_PROTO_TCP,\r
Tcb->UseDefaultAddr\r
);\r
Sock->DevicePath\r
);\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (Sock->DevicePath);\r
+ FreePool (Sock->DevicePath);\r
}\r
\r
return Status;\r