From: octo Date: Thu, 1 Jun 2006 20:39:43 +0000 (+0000) Subject: Removed the call to `bind'. X-Git-Tag: collectd-3.8.6^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e041f6fa5c4353e27e715978a36cca4b22cffb69;p=collectd.git Removed the call to `bind'. It's only neccessary when binding to a specific (local) address, which we don't. FreeBSD, Mac OS X and potentially other operating systems didn't like this.. GNU/Linux never complained, though.. --- diff --git a/src/liboping/liboping.c b/src/liboping/liboping.c index afd44868..1ee23930 100644 --- a/src/liboping/liboping.c +++ b/src/liboping/liboping.c @@ -904,6 +904,7 @@ int ping_host_add (pingobj_t *obj, const char *host) continue; } +#if 0 if (bind (ph->fd, (struct sockaddr *) &sockaddr, sockaddr_len) == -1) { dprintf ("bind: %s\n", strerror (errno)); @@ -911,6 +912,7 @@ int ping_host_add (pingobj_t *obj, const char *host) ph->fd = -1; continue; } +#endif assert (sizeof (struct sockaddr_storage) >= ai_ptr->ai_addrlen); memset (ph->addr, '\0', sizeof (struct sockaddr_storage));