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(a)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/…
==============================================================================
--- 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;
}