SF.net SVN: nagiosplug: [1822] nagiosplug/trunk/plugins/check_ntp.c

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 1822
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1822&view=rev
Author:   dermoth
Date:     2007-11-10 09:37:11 -0800 (Sat, 10 Nov 2007)

Log Message:
-----------
Fix newly added stratum check (has to be decreased by one when using normal NTP packets versus control packets)

Modified Paths:
--------------
    nagiosplug/trunk/plugins/check_ntp.c

Modified: nagiosplug/trunk/plugins/check_ntp.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp.c	2007-11-10 17:20:34 UTC (rev 1821)
+++ nagiosplug/trunk/plugins/check_ntp.c	2007-11-10 17:37:11 UTC (rev 1822)
@@ -487,7 +487,9 @@
 			avg_offset+=servers[best_index].offset[j];
 		}
 		avg_offset/=servers[best_index].num_responses;
-		*stratum = servers[best_index].stratum;
+		/* Stratum sent in normal packets is ingreased by 1 (i.e. stratum that
+		 * would be displayed if we were a server) so we decrease it */
+		*stratum = servers[best_index].stratum - 1;
 	}
 
 	/* cleanup */


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
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.