[Nagiosplug-checkins] nagiosplug/plugins check_ntp.c,1.18,1.19

Thomas Guyot dermoth at users.sourceforge.net
Mon Apr 2 08:01:04 CEST 2007


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2588/plugins

Modified Files:
	check_ntp.c 
Log Message:
Seems like we don't get any jitter sometimes. While this needs to be fixed we should at least handle it gracefully.


Index: check_ntp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ntp.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- check_ntp.c	31 Mar 2007 18:48:17 -0000	1.18
+++ check_ntp.c	2 Apr 2007 06:00:59 -0000	1.19
@@ -595,7 +595,8 @@
 				if(verbose) {
 					printf("parsing jitter from peer %.2x: ", peers[i].assoc);
 				}
-				startofvalue = strchr(req.data, '=') + 1;
+				startofvalue = strchr(req.data, '=');
+				if(startofvalue != NULL) startofvalue++;
 				if(startofvalue != NULL) {
 					jitter = strtod(startofvalue, &nptr);
 				}





More information about the Commits mailing list