diff options
author | M. Sean Finney <seanius@users.sourceforge.net> | 2005-05-25 00:30:19 +0000 |
---|---|---|
committer | M. Sean Finney <seanius@users.sourceforge.net> | 2005-05-25 00:30:19 +0000 |
commit | 8134ec30d1fdf9b9921885154c900d2a88707676 (patch) | |
tree | 15fbf02522099e889e73292bd387c8944b45a9e0 /plugins | |
parent | dafcd900153a982467d24358724ff51850f28d4c (diff) | |
download | monitoring-plugins-8134ec30d1fdf9b9921885154c900d2a88707676.tar.gz |
bah, my_connect is taken by mysql. now calling it np_net_connect.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1176 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_tcp.c | 2 | ||||
-rw-r--r-- | plugins/netutils.c | 6 | ||||
-rw-r--r-- | plugins/netutils.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 1bf1f4cb..3087453a 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -284,7 +284,7 @@ main (int argc, char **argv) | |||
284 | result = connect_SSL (); | 284 | result = connect_SSL (); |
285 | else | 285 | else |
286 | #endif | 286 | #endif |
287 | result = my_connect (server_address, server_port, &sd, PROTOCOL); | 287 | result = np_net_connect (server_address, server_port, &sd, PROTOCOL); |
288 | 288 | ||
289 | if (result == STATE_CRITICAL) | 289 | if (result == STATE_CRITICAL) |
290 | return STATE_CRITICAL; | 290 | return STATE_CRITICAL; |
diff --git a/plugins/netutils.c b/plugins/netutils.c index e7d5ba78..9539a7f0 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c | |||
@@ -68,7 +68,7 @@ process_tcp_request2 (const char *server_address, int server_port, | |||
68 | fd_set readfds; | 68 | fd_set readfds; |
69 | int recv_length = 0; | 69 | int recv_length = 0; |
70 | 70 | ||
71 | result = my_connect (server_address, server_port, &sd, IPPROTO_TCP); | 71 | result = np_net_connect (server_address, server_port, &sd, IPPROTO_TCP); |
72 | if (result != STATE_OK) | 72 | if (result != STATE_OK) |
73 | return STATE_CRITICAL; | 73 | return STATE_CRITICAL; |
74 | 74 | ||
@@ -143,7 +143,7 @@ process_request (const char *server_address, int server_port, int proto, | |||
143 | 143 | ||
144 | result = STATE_OK; | 144 | result = STATE_OK; |
145 | 145 | ||
146 | result = my_connect (server_address, server_port, &sd, proto); | 146 | result = np_net_connect (server_address, server_port, &sd, proto); |
147 | if (result != STATE_OK) | 147 | if (result != STATE_OK) |
148 | return STATE_CRITICAL; | 148 | return STATE_CRITICAL; |
149 | 149 | ||
@@ -157,7 +157,7 @@ process_request (const char *server_address, int server_port, int proto, | |||
157 | 157 | ||
158 | /* opens a tcp or udp connection to a remote host */ | 158 | /* opens a tcp or udp connection to a remote host */ |
159 | int | 159 | int |
160 | my_connect (const char *host_name, int port, int *sd, int proto) | 160 | np_net_connect (const char *host_name, int port, int *sd, int proto) |
161 | { | 161 | { |
162 | struct addrinfo hints; | 162 | struct addrinfo hints; |
163 | struct addrinfo *res, *res0; | 163 | struct addrinfo *res, *res0; |
diff --git a/plugins/netutils.h b/plugins/netutils.h index bd532011..1a52eecc 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h | |||
@@ -49,9 +49,9 @@ int process_request (const char *address, int port, int proto, | |||
49 | const char *sbuffer, char *rbuffer, int rsize); | 49 | const char *sbuffer, char *rbuffer, int rsize); |
50 | 50 | ||
51 | /* my_connect and wrapper macros */ | 51 | /* my_connect and wrapper macros */ |
52 | #define my_tcp_connect(addr, port, s) my_connect(addr, port, s, IPPROTO_TCP) | 52 | #define my_tcp_connect(addr, port, s) np_net_connect(addr, port, s, IPPROTO_TCP) |
53 | #define my_udp_connect(addr, port, s) my_connect(addr, port, s, IPPROTO_UDP) | 53 | #define my_udp_connect(addr, port, s) np_net_connect(addr, port, s, IPPROTO_UDP) |
54 | int my_connect(const char *address, int port, int *sd, int proto); | 54 | int np_net_connect(const char *address, int port, int *sd, int proto); |
55 | 55 | ||
56 | /* send_request and wrapper macros */ | 56 | /* send_request and wrapper macros */ |
57 | #define send_tcp_request(s, sbuf, rbuf, rsize) \ | 57 | #define send_tcp_request(s, sbuf, rbuf, rsize) \ |