SF.net SVN: nagiosplug:[2223] nagiosplug/trunk/plugins-root/check_icmp.c

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2223
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2223&view=rev
Author:   dermoth
Date:     2009-06-14 21:47:15 +0000 (Sun, 14 Jun 2009)

Log Message:
-----------
Fixed error in rtt/rta calculation in case of system clock problems

Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more.
The RTA calculation hopefully gets a more accurate value in these cases also.

From: Matthias Eble <[email protected]>

Modified Paths:
--------------
    nagiosplug/trunk/plugins-root/check_icmp.c

Modified: nagiosplug/trunk/plugins-root/check_icmp.c
===================================================================
--- nagiosplug/trunk/plugins-root/check_icmp.c	2009-06-13 16:17:35 UTC (rev 2222)
+++ nagiosplug/trunk/plugins-root/check_icmp.c	2009-06-14 21:47:15 UTC (rev 2223)
@@ -1035,7 +1035,7 @@
 	if(!early) early = &prog_start;
 
 	/* if early > later we return 0 so as to indicate a timeout */
-	if(early->tv_sec > early->tv_sec ||
+	if(early->tv_sec > later->tv_sec ||
 	   (early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
 	{
 		return 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.