aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2012-06-25 01:58:17 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2012-06-25 01:58:17 +0200
commit88fdf3a8a8e17f9212e10befe1f24ff3fa1aa8e6 (patch)
tree57f23423e50fd3b06fb957ee9670a922a5d3d455 /plugins/check_ping.c
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.
Diffstat (limited to 'plugins/check_ping.c')
-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)
if (strstr (buf, "Network is unreachable") ||
strstr (buf, "Destination Net Unreachable")
)
- die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr);
else if (strstr (buf, "Destination Host Unreachable"))
- die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr);
else if (strstr (buf, "Destination Port Unreachable"))
- die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr);
else if (strstr (buf, "Destination Protocol Unreachable"))
- die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr);
else if (strstr (buf, "Destination Net Prohibited"))
- die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr);
else if (strstr (buf, "Destination Host Prohibited"))
- die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr);
else if (strstr (buf, "Packet filtered"))
- die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr);
else if (strstr (buf, "unknown host" ))
- die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr);
else if (strstr (buf, "Time to live exceeded"))
- die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr);
else if (strstr (buf, "Destination unreachable: "))
- die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)"), addr);
+ die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr);
if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) {
if (warn_text == NULL)
warn_text = strdup (_(WARN_DUPLICATES));
else if (! strstr (warn_text, _(WARN_DUPLICATES)) &&
asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
- die (STATE_UNKNOWN, _("Unable to realloc warn_text"));
+ die (STATE_UNKNOWN, _("Unable to realloc warn_text\n"));
return (STATE_WARNING);
}