aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-29 20:01:26 +0000
committerGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-29 20:01:26 +0000
commit716ff400f04bd053a1bba0affd773b03f284baad (patch)
tree243c74944117c2912537ccfbb837fdf66a550171 /plugins
parent1e2982f0723fe7e884d63212530ad9c9d491a2f5 (diff)
downloadmonitoring-plugins-716ff400f04bd053a1bba0affd773b03f284baad.tar.gz
Fix segfault when -e is specified multiple times. Thanks to John Rouillard and Ralph Roessner (#1475899)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1723 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index a977077c..315c7525 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -517,7 +517,6 @@ process_arguments (int argc, char **argv)
asprintf(&server_send, "%s", optarg);
break;
case 'e': /* expect string (may be repeated) */
- EXPECT = NULL;
flags &= ~FLAG_EXACT_MATCH;
if (server_expect_count == 0)
server_expect = malloc (sizeof (char *) * (++server_expect_count));
@@ -619,7 +618,7 @@ print_help (void)
printf (" %s\n", "-s, --send=STRING");
printf (" %s\n", _("String to send to the server"));
printf (" %s\n", "-e, --expect=STRING");
- printf (" %s\n", _("String to expect in server response"));
+ printf (" %s %s\n", _("String to expect in server response"), _("(may be repeated)"));
printf (" %s\n", "-q, --quit=STRING");
printf (" %s\n", _("String to send server to initiate a clean close of the connection"));
printf (" %s\n", "-r, --refuse=ok|warn|crit");