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

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Sat Nov 10 18:37:12 CET 2007


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.




More information about the Commits mailing list