Code

Seems like we don't get any jitter sometimes. While this needs to be fixed we should...
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Mon, 2 Apr 2007 06:00:59 +0000 (06:00 +0000)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Mon, 2 Apr 2007 06:00:59 +0000 (06:00 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1670 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_ntp.c

index 9fbdedd6e5f92160e99b5c67960a282a98a10df6..8b49928abaf5431f9fef2c90d38db0adbe43ae9c 100644 (file)
@@ -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);
                                }