diff options
Diffstat (limited to 'plugins/utils.c')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c index 6f3a151..b4c3944 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * | 31 | * |
32 | ****************************************************************************/ | 32 | ****************************************************************************/ |
33 | 33 | ||
34 | #define LOCAL_TIMEOUT_ALARM_HANDLER | ||
35 | |||
34 | #include "common.h" | 36 | #include "common.h" |
35 | #include "netutils.h" | 37 | #include "netutils.h" |
36 | 38 | ||
@@ -217,14 +219,14 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) | |||
217 | /* else the hostname is interpreted as a path to a unix socket */ | 219 | /* else the hostname is interpreted as a path to a unix socket */ |
218 | else { | 220 | else { |
219 | if(strlen(host_name) >= UNIX_PATH_MAX){ | 221 | if(strlen(host_name) >= UNIX_PATH_MAX){ |
220 | die(_("Supplied path too long unix domain socket")); | 222 | die(STATE_UNKNOWN, _("Supplied path too long unix domain socket")); |
221 | } | 223 | } |
222 | memset(&su, 0, sizeof(su)); | 224 | memset(&su, 0, sizeof(su)); |
223 | su.sun_family = AF_UNIX; | 225 | su.sun_family = AF_UNIX; |
224 | strncpy(su.sun_path, host_name, UNIX_PATH_MAX); | 226 | strncpy(su.sun_path, host_name, UNIX_PATH_MAX); |
225 | *sd = socket(PF_UNIX, SOCK_STREAM, 0); | 227 | *sd = socket(PF_UNIX, SOCK_STREAM, 0); |
226 | if(sd < 0){ | 228 | if(sd < 0){ |
227 | die(_("Socket creation failed")); | 229 | die(STATE_UNKNOWN, _("Socket creation failed")); |
228 | } | 230 | } |
229 | result = connect(*sd, (struct sockaddr *)&su, sizeof(su)); | 231 | result = connect(*sd, (struct sockaddr *)&su, sizeof(su)); |
230 | if (result < 0 && errno == ECONNREFUSED) | 232 | if (result < 0 && errno == ECONNREFUSED) |
diff --git a/plugins/sslutils.c b/plugins/sslutils.c index d785fb7..66c7299 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | ****************************************************************************/ | 32 | ****************************************************************************/ |
33 | 33 | ||
34 | #define LOCAL_TIMEOUT_ALARM_HANDLER | ||
34 | #include "common.h" | 35 | #include "common.h" |
35 | #include "netutils.h" | 36 | #include "netutils.h" |
36 | 37 | ||