Prechádzať zdrojové kódy

check_ping: Fixing "time of day goes back"

Just turning attached patch of github issue #809 into a push request.
Jan Wagner 12 rokov pred
rodič
commit
cc80c588ce
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 5 1
      plugins/check_ping.c

+ 5 - 1
plugins/check_ping.c

@@ -482,7 +482,11 @@ run_ping (const char *cmd, const char *addr)
 	/* check stderr, setting at least WARNING if there is output here */
 	/* Add warning into warn_text */
 	while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) {
-		if (! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) {
+		if (
+			! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")
+			&& ! strstr(buf,"Warning: time of day goes back")
+
+		) {
 			if (verbose >= 3) {
 				printf("Got stderr: %s", buf);
 			}