mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 22:00:31 -04:00
While here, improve formatting PR: 238745 [1] Submitted by: Krzysztof <ports@bsdserwis.com> (maintainer) [1]
16 lines
455 B
C
16 lines
455 B
C
--- src/libcollectdclient/network.c.orig 2019-06-13 09:13:42 UTC
|
|
+++ src/libcollectdclient/network.c
|
|
@@ -178,6 +178,13 @@ static int server_open_socket(lcc_server
|
|
continue;
|
|
}
|
|
|
|
+ status = sendto(srv->fd, "", 1, 0, ai_ptr->ai_addr, ai_ptr->ai_addrlen);
|
|
+ if (status != 1) {
|
|
+ close(srv->fd);
|
|
+ srv->fd = -1;
|
|
+ continue;
|
|
+ }
|
|
+
|
|
srv->sa = malloc(ai_ptr->ai_addrlen);
|
|
if (srv->sa == NULL) {
|
|
close(srv->fd);
|