[ros-bugs] [Bug 1194] New: PING always reports "minimum RTT" == "maximum RTT"

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Sat Dec 24 15:57:54 CET 2005


http://www.reactos.org/bugzilla/show_bug.cgi?id=1194

           Summary: PING always reports "minimum RTT" == "maximum RTT"
           Product: ReactOS Apps (rosapps)
           Version: unspecified
          Platform: QEmu
        OS/Version: ReactOS
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Utilities
        AssignedTo: ros-bugs at reactos.org
        ReportedBy: mauro.giachero at gmail.com
         QAContact: ros-bugs at reactos.org


The PING utility (from ReactOS 0.2.9) always reports the maximum RTT value in 
place of the minimum RTT encountered.
Looking at the code (SRC_DIR\0.2.9\apps\utils\net\ping\ping.c) I noticed that 
the problem is that the MinRTTSet boolean is never set to TRUE (the test on line 
456:

    if (RelativeTime.QuadPart < MinRTT.QuadPart) {
	MinRTT.QuadPart = RelativeTime.QuadPart;
      MinRTTSet = TRUE;
    }

is always false, since RelativeTime.QuadPart>=0 and MinRTT.QuadPart==0 from line 
352).

Although I haven't tried this, the problem should be easily fixed by modifying 
the test condition to:

    if ((RelativeTime.QuadPart < MinRTT.QuadPart) || !MinRTTSet) {
      ...

Best regards
Mauro

PS: just for the versioning infos, here are the comments at the beginning of 
ping.c:

/* $Id: ping.c 19633 2005-11-26 12:14:28Z gedmurphy $
 *
 * COPYRIGHT:   See COPYING in the top level directory
 * PROJECT:     ReactOS ping utility
 * FILE:        apps/net/ping/ping.c
 * PURPOSE:     Network test utility
 * PROGRAMMERS: Casper S. Hornstrup (chorns at users.sourceforge.net)
 * REVISIONS:
 *   CSH  01/09/2000 Created
 */

-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.


More information about the Ros-bugs mailing list