summaryrefslogtreecommitdiffstats
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
authorGunnar Beutner <gunnar@beutner.name>2014-04-21 09:29:45 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-04-27 17:59:06 (GMT)
commite0af39d7e9fcd084cf7d2d8a57d07ab1f8038150 (patch)
treef6eee031831451476795e139b6ceb33298b1155d /plugins/check_ping.c
parentd00efeb872c968824879614c848cead71452cbfd (diff)
downloadmonitoring-plugins-e0af39d7e9fcd084cf7d2d8a57d07ab1f8038150.tar.gz
Make check_ping work on Windows.
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 95ac7b4..dbc5c3e 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -458,7 +458,8 @@ run_ping (const char *cmd, const char *addr)
458 (sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time%n",&pl,&match) && match) || 458 (sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time%n",&pl,&match) && match) ||
459 (sscanf(buf,"%*d packets transmitted, %*d received, %d%% packet loss, time%n",&pl,&match) && match) || 459 (sscanf(buf,"%*d packets transmitted, %*d received, %d%% packet loss, time%n",&pl,&match) && match) ||
460 (sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) || 460 (sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
461 (sscanf(buf,"%*d packets transmitted %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) 461 (sscanf(buf,"%*d packets transmitted %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
462 (sscanf(buf,"%*[^(](%d%% %*[^)])%n",&pl,&match) && match)
462 ) 463 )
463 continue; 464 continue;
464 465
@@ -471,7 +472,9 @@ run_ping (const char *cmd, const char *addr)
471 (sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f%n",&rta,&match) && match) || 472 (sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
472 (sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) || 473 (sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) ||
473 (sscanf(buf,"round-trip (ms) min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) || 474 (sscanf(buf,"round-trip (ms) min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
474 (sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms%n",&rta,&match) && match)) 475 (sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms%n",&rta,&match) && match) ||
476 (sscanf(buf, "%*[^=] = %*fms, %*[^=] = %*fms, %*[^=] = %fms%n", &rta, &match) && match)
477 )
475 continue; 478 continue;
476 } 479 }
477 480