Преглед изворни кода

Seems like we don't get any jitter sometimes. While this needs to be fixed we should at least handle it gracefully.

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1670 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest пре 19 година
родитељ
комит
7856e1ba2b
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      plugins/check_ntp.c

+ 2 - 1
plugins/check_ntp.c

@@ -595,7 +595,8 @@ double jitter_request(const char *host, int *status){
 				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);
 				}