Code

git-notify: Support SourceForge repositories
[nagiosplug.git] / plugins / netutils.c
index 1a5547e971138a6b197e76a64d23f87aeadc9b44..1d6100abf843efd3f25a8209adbdcfa4042d8fd4 100644 (file)
@@ -6,8 +6,6 @@
 * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
 * Copyright (c) 2003-2008 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
 * Description:
 * 
 * This file contains commons functions used in many of the plugins.
@@ -26,7 +24,6 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
@@ -35,7 +32,6 @@
 #include "common.h"
 #include "netutils.h"
 
-unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT;
 int econn_refuse_state = STATE_CRITICAL;
 int was_refused = FALSE;
 #if USE_IPV6
@@ -49,11 +45,11 @@ void
 socket_timeout_alarm_handler (int sig)
 {
        if (sig == SIGALRM)
-               printf (_("CRITICAL - Socket timeout after %d seconds\n"), socket_timeout);
+               printf (_("%s - Socket timeout after %d seconds\n"), state_text(socket_timeout_state),  socket_timeout);
        else
-               printf (_("CRITICAL - Abnormal timeout after %d seconds\n"), socket_timeout);
+               printf (_("%s - Abnormal timeout after %d seconds\n"), state_text(socket_timeout_state), socket_timeout);
 
-       exit (STATE_CRITICAL);
+       exit (socket_timeout_state);
 }