From: Thomas Guyot-Sionnest Date: Mon, 2 Apr 2007 06:00:59 +0000 (+0000) Subject: Seems like we don't get any jitter sometimes. While this needs to be fixed we should... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7856e1ba2b456c9896187230d1bd67a5fdab8942;p=nagiosplug.git 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 --- diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 9fbdedd..8b49928 100644 --- a/plugins/check_ntp.c +++ b/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); }