Revision: 1813
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1813&view=rev
Author: dermoth
Date: 2007-11-09 05:08:43 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Close the socket on all exits (not just the OK one)
Modified Paths:
--------------
nagiosplug/trunk/plugins/check_ssh.c
Modified: nagiosplug/trunk/plugins/check_ssh.c
===================================================================
--- nagiosplug/trunk/plugins/check_ssh.c 2007-11-09 13:06:32 UTC (rev 1812)
+++ nagiosplug/trunk/plugins/check_ssh.c 2007-11-09 13:08:43 UTC (rev 1813)
@@ -233,6 +233,7 @@
recv (sd, output, BUFF_SZ, 0);
if (strncmp (output, "SSH", 3)) {
printf (_("Server answer: %s"), output);
+ close(sd);
exit (STATE_CRITICAL);
}
else {
@@ -252,6 +253,7 @@
printf
(_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"),
ssh_server, ssh_proto, remote_version);
+ close(sd);
exit (STATE_WARNING);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.