[ros-diffs] [cfinck] 35371: Mario Kacmar (kario at szm.sk) - Print no approximate round trip times on 100% loss like Windows does See issue #2542 for more details.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Sat Aug 16 12:44:53 CEST 2008


Author: cfinck
Date: Sat Aug 16 05:44:53 2008
New Revision: 35371

URL: http://svn.reactos.org/svn/reactos?rev=35371&view=rev
Log:
Mario Kacmar (kario at szm.sk)
- Print no approximate round trip times on 100% loss like Windows does

See issue #2542 for more details.

Modified:
    trunk/reactos/base/applications/network/ping/ping.c

Modified: trunk/reactos/base/applications/network/ping/ping.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ping/ping.c?rev=35371&r1=35370&r2=35371&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] Sat Aug 16 05:44:53 2008
@@ -644,9 +644,13 @@
         printf("\nPing statistics for %s:\n", TargetIP);
         printf("    Packets: Sent = %d, Received = %d, Lost = %d (%d%% loss),\n",
             SentCount, SentCount - LostCount, LostCount, Count);
-        printf("Approximate round trip times in milli-seconds:\n");
-        printf("    Minimum = %s, Maximum = %s, Average = %s\n",
-            MinTime, MaxTime, AvgTime);
+        /* Print approximate times or NO approximate times if 100% loss */
+        if ((SentCount - LostCount) > 0)
+        {
+            printf("Approximate round trip times in milli-seconds:\n");
+            printf("    Minimum = %s, Maximum = %s, Average = %s\n",
+                MinTime, MaxTime, AvgTime);
+        }
     }
     return 0;
 }



More information about the Ros-diffs mailing list