X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fnetwork.c;h=a659189f3e7960d312d0d608f9f8af55d1e3c5bb;hb=acbd25344a59c091b087311804d375b759077e32;hp=ab04f4c13bd349117b1f3dd324b638ef2e4edb1a;hpb=b538a4fc80d63b881382e33f517f4e38e559478a;p=collectd.git diff --git a/src/network.c b/src/network.c index ab04f4c1..a659189f 100644 --- a/src/network.c +++ b/src/network.c @@ -682,10 +682,11 @@ static int network_set_ttl (const sockent_t *se, const struct addrinfo *ai) static int network_bind_socket (const sockent_t *se, const struct addrinfo *ai) { int loop = 0; + int yes = 1; /* allow multiple sockets to use the same PORT number */ if (setsockopt(se->fd, SOL_SOCKET, SO_REUSEADDR, - &loop, sizeof(loop)) == -1) { + &yes, sizeof(yes)) == -1) { char errbuf[1024]; ERROR ("setsockopt: %s", sstrerror (errno, errbuf, sizeof (errbuf)));