[Nagiosplug-checkins] nagiosplug/plugins check_tcp.c,1.90,1.91
Matthias Eble
psychotrahe at users.sourceforge.net
Tue May 29 22:01:28 CEST 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17791/plugins
Modified Files:
check_tcp.c
Log Message:
Fix segfault when -e is specified multiple times. Thanks to John Rouillard and Ralph Roessner (#1475899)
Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- check_tcp.c 29 May 2007 19:11:42 -0000 1.90
+++ check_tcp.c 29 May 2007 20:01:26 -0000 1.91
@@ -517,7 +517,6 @@
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 @@
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");
More information about the Commits
mailing list