Просмотр исходного кода

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
M. Sean Finney 21 лет назад
Родитель
Сommit
8134ec30d1
3 измененных файлов с 7 добавлено и 7 удалено
  1. 1 1
      plugins/check_tcp.c
  2. 3 3
      plugins/netutils.c
  3. 3 3
      plugins/netutils.h

+ 1 - 1
plugins/check_tcp.c

@@ -284,7 +284,7 @@ main (int argc, char **argv)
 		result = connect_SSL ();
 	else
 #endif
-		result = my_connect (server_address, server_port, &sd, PROTOCOL);
+		result = np_net_connect (server_address, server_port, &sd, PROTOCOL);
 
 	if (result == STATE_CRITICAL)
 		return STATE_CRITICAL;

+ 3 - 3
plugins/netutils.c

@@ -68,7 +68,7 @@ process_tcp_request2 (const char *server_address, int server_port,
 	fd_set readfds;
 	int recv_length = 0;
 
-	result = my_connect (server_address, server_port, &sd, IPPROTO_TCP);
+	result = np_net_connect (server_address, server_port, &sd, IPPROTO_TCP);
 	if (result != STATE_OK)
 		return STATE_CRITICAL;
 
@@ -143,7 +143,7 @@ process_request (const char *server_address, int server_port, int proto,
 
 	result = STATE_OK;
 
-	result = my_connect (server_address, server_port, &sd, proto);
+	result = np_net_connect (server_address, server_port, &sd, proto);
 	if (result != STATE_OK)
 		return STATE_CRITICAL;
 
@@ -157,7 +157,7 @@ process_request (const char *server_address, int server_port, int proto,
 
 /* opens a tcp or udp connection to a remote host */
 int
-my_connect (const char *host_name, int port, int *sd, int proto)
+np_net_connect (const char *host_name, int port, int *sd, int proto)
 {
 	struct addrinfo hints;
 	struct addrinfo *res, *res0;

+ 3 - 3
plugins/netutils.h

@@ -49,9 +49,9 @@ int process_request (const char *address, int port, int proto,
   const char *sbuffer, char *rbuffer, int rsize);
 
 /* my_connect and wrapper macros */
-#define my_tcp_connect(addr, port, s) my_connect(addr, port, s, IPPROTO_TCP)
-#define my_udp_connect(addr, port, s) my_connect(addr, port, s, IPPROTO_UDP)
-int my_connect(const char *address, int port, int *sd, int proto);
+#define my_tcp_connect(addr, port, s) np_net_connect(addr, port, s, IPPROTO_TCP)
+#define my_udp_connect(addr, port, s) np_net_connect(addr, port, s, IPPROTO_UDP)
+int np_net_connect(const char *address, int port, int *sd, int proto);
 
 /* send_request and wrapper macros */
 #define send_tcp_request(s, sbuf, rbuf, rsize) \