summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2012-06-25 01:58:17 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2012-06-25 01:58:17 +0200
commit88fdf3a8a8e17f9212e10befe1f24ff3fa1aa8e6 (patch)
tree57f23423e50fd3b06fb957ee9670a922a5d3d455
parent94f4aca9770d0356318364ddc2d074ba895afe04 (diff)
downloadmonitoring-plugins-88fdf3a8a8e17f9212e10befe1f24ff3fa1aa8e6.tar.gz
check_ping: Add missing newline to die() calls
Our die() function expects the caller to append the trailing newline character.
-rw-r--r--plugins/check_ping.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 23dcd6a8..473f9f24 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -516,32 +516,32 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
516 if (strstr (buf, "Network is unreachable") || 516 if (strstr (buf, "Network is unreachable") ||
517 strstr (buf, "Destination Net Unreachable") 517 strstr (buf, "Destination Net Unreachable")
518 ) 518 )
519 die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); 519 die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr);
520 else if (strstr (buf, "Destination Host Unreachable")) 520 else if (strstr (buf, "Destination Host Unreachable"))
521 die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); 521 die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr);
522 else if (strstr (buf, "Destination Port Unreachable")) 522 else if (strstr (buf, "Destination Port Unreachable"))
523 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr); 523 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr);
524 else if (strstr (buf, "Destination Protocol Unreachable")) 524 else if (strstr (buf, "Destination Protocol Unreachable"))
525 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr); 525 die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr);
526 else if (strstr (buf, "Destination Net Prohibited")) 526 else if (strstr (buf, "Destination Net Prohibited"))
527 die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr); 527 die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr);
528 else if (strstr (buf, "Destination Host Prohibited")) 528 else if (strstr (buf, "Destination Host Prohibited"))
529 die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr); 529 die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr);
530 else if (strstr (buf, "Packet filtered")) 530 else if (strstr (buf, "Packet filtered"))
531 die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr); 531 die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr);
532 else if (strstr (buf, "unknown host" )) 532 else if (strstr (buf, "unknown host" ))
533 die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); 533 die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr);
534 else if (strstr (buf, "Time to live exceeded")) 534 else if (strstr (buf, "Time to live exceeded"))
535 die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)"), addr); 535 die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr);
536 else if (strstr (buf, "Destination unreachable: ")) 536 else if (strstr (buf, "Destination unreachable: "))
537 die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)"), addr); 537 die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr);
538 538
539 if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) { 539 if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) {
540 if (warn_text == NULL) 540 if (warn_text == NULL)
541 warn_text = strdup (_(WARN_DUPLICATES)); 541 warn_text = strdup (_(WARN_DUPLICATES));
542 else if (! strstr (warn_text, _(WARN_DUPLICATES)) && 542 else if (! strstr (warn_text, _(WARN_DUPLICATES)) &&
543 asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1) 543 asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
544 die (STATE_UNKNOWN, _("Unable to realloc warn_text")); 544 die (STATE_UNKNOWN, _("Unable to realloc warn_text\n"));
545 return (STATE_WARNING); 545 return (STATE_WARNING);
546 } 546 }
547 547