From 3038819fef47495af2730b0d2df2a5a8475fc7bb Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Mon, 31 Oct 2005 20:03:19 +0000 Subject: code cleanups, largely resulting from turning on -Wall. mostly unused variables and explicit casting issues, but there were a couple gotchas in there too. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1267 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/netutils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/netutils.c') diff --git a/plugins/netutils.c b/plugins/netutils.c index 6f3a1510..b4c3944b 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -31,6 +31,8 @@ * ****************************************************************************/ +#define LOCAL_TIMEOUT_ALARM_HANDLER + #include "common.h" #include "netutils.h" @@ -217,14 +219,14 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) /* else the hostname is interpreted as a path to a unix socket */ else { if(strlen(host_name) >= UNIX_PATH_MAX){ - die(_("Supplied path too long unix domain socket")); + die(STATE_UNKNOWN, _("Supplied path too long unix domain socket")); } memset(&su, 0, sizeof(su)); su.sun_family = AF_UNIX; strncpy(su.sun_path, host_name, UNIX_PATH_MAX); *sd = socket(PF_UNIX, SOCK_STREAM, 0); if(sd < 0){ - die(_("Socket creation failed")); + die(STATE_UNKNOWN, _("Socket creation failed")); } result = connect(*sd, (struct sockaddr *)&su, sizeof(su)); if (result < 0 && errno == ECONNREFUSED) -- cgit v1.2.3-74-g34f1