]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c
MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Timer.c
index 91e763c48646c49573099dd71298b951e5d67868..4cb0ee7b5e6f9fe3797fbda90cea62b1ed6e7b59 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   TCP timer related functions.\r
-    \r
-Copyright (c) 2005 - 2007, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+\r
+Copyright (c) 2005 - 2018, 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
@@ -37,7 +37,7 @@ VOID
 TcpRexmitTimeout (\r
   IN OUT TCP_CB *Tcb\r
   );\r
-  \r
+\r
 /**\r
   Timeout handler for window probe timer.\r
 \r
@@ -212,6 +212,7 @@ TcpProbeTimeout (
   if ((TcpDataToSend (Tcb, 1) != 0) && (TcpToSendData (Tcb, 1) > 0)) {\r
 \r
     ASSERT (TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_REXMIT) != 0);\r
+    Tcb->ProbeTimerOn = FALSE;\r
     return ;\r
   }\r
 \r
@@ -288,7 +289,7 @@ Tcp2MSLTimeout (
 \r
 \r
 /**\r
-  Update the timer status and the next expire time according to the timers \r
+  Update the timer status and the next expire time according to the timers\r
   to expire in a specific future time slot.\r
 \r
   @param  Tcb      Pointer to the TCP_CB of this TCP instance.\r
@@ -387,8 +388,9 @@ TcpSetProbeTimer (
   IN OUT TCP_CB *Tcb\r
   )\r
 {\r
-  if (!TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_PROBE)) {\r
-    Tcb->ProbeTime = Tcb->Rto;\r
+  if (!Tcb->ProbeTimerOn) {\r
+    Tcb->ProbeTime    = Tcb->Rto;\r
+    Tcb->ProbeTimerOn = TRUE;\r
 \r
   } else {\r
     Tcb->ProbeTime <<= 1;\r
@@ -553,7 +555,7 @@ TcpTickingDpc (
         }\r
       }\r
     }\r
-    \r
+\r
     //\r
     // If the Tcb still exist or some timer is set, update the timer\r
     //\r