diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
commit | caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe (patch) | |
tree | 118fd80cc8ba27ef695a8e8ce409e5d70f4fa451 /plugins/netutils.c | |
parent | 16f53e0717b60660145388b0feb351628f606211 (diff) | |
download | monitoring-plugins-caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe.tar.gz |
Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r-- | plugins/netutils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c index 5e00723e..1a5547e9 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -35,7 +35,7 @@ #include "common.h" #include "netutils.h" -unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; +unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; int econn_refuse_state = STATE_CRITICAL; int was_refused = FALSE; #if USE_IPV6 @@ -57,8 +57,8 @@ socket_timeout_alarm_handler (int sig) } -/* connects to a host on a specified tcp port, sends a string, and gets a - response. loops on select-recv until timeout or eof to get all of a +/* connects to a host on a specified tcp port, sends a string, and gets a + response. loops on select-recv until timeout or eof to get all of a multi-packet answer */ int process_tcp_request2 (const char *server_address, int server_port, @@ -106,7 +106,7 @@ process_tcp_request2 (const char *server_address, int server_port, } else { /* it has */ recv_result = - recv (sd, recv_buffer + recv_length, + recv (sd, recv_buffer + recv_length, (size_t)recv_size - recv_length - 1, 0); if (recv_result == -1) { /* recv failed, bail out */ @@ -137,7 +137,7 @@ process_tcp_request2 (const char *server_address, int server_port, } -/* connects to a host on a specified port, sends a string, and gets a +/* connects to a host on a specified port, sends a string, and gets a response */ int process_request (const char *server_address, int server_port, int proto, @@ -229,7 +229,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) r = r->ai_next; } freeaddrinfo (res); - } + } /* else the hostname is interpreted as a path to a unix socket */ else { if(strlen(host_name) >= UNIX_PATH_MAX){ @@ -251,7 +251,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) return STATE_OK; else if (was_refused) { switch (econn_refuse_state) { /* a user-defined expected outcome */ - case STATE_OK: + case STATE_OK: case STATE_WARNING: /* user wants WARN or OK on refusal */ return econn_refuse_state; break; @@ -285,7 +285,7 @@ send_request (int sd, int proto, const char *send_buffer, char *recv_buffer, int result = STATE_WARNING; } - /* wait up to the number of seconds for socket timeout minus one + /* wait up to the number of seconds for socket timeout minus one for data from the host */ tv.tv_sec = socket_timeout - 1; tv.tv_usec = 0; @@ -340,7 +340,7 @@ is_addr (const char *address) #ifdef USE_IPV6 if (address_family == AF_INET && is_inet_addr (address)) return TRUE; - else if (address_family == AF_INET6 && is_inet6_addr (address)) + else if (address_family == AF_INET6 && is_inet6_addr (address)) return TRUE; #else if (is_inet_addr (address)) |