}
safe_free(strAddr);
- IpAddress no_addr;
- no_addr.SetNoAddr();
+ IpAddress any_addr;
+ any_addr.SetAnyAddr();
#if USE_IPV6
// require the sending UDP port to be of the right family for the destination address.
if (addr.IsIPv4())
- no_addr.SetIPv4();
+ any_addr.SetIPv4();
#endif
- ll->fd = comm_open(SOCK_DGRAM, IPPROTO_UDP, no_addr, COMM_NONBLOCKING, "UDP log socket");
+ ll->fd = comm_open(SOCK_DGRAM, IPPROTO_UDP, any_addr, COMM_NONBLOCKING, "UDP log socket");
if (ll->fd < 0) {
if (lf->flags.fatal) {
fatalf("Unable to open UDP socket for logging\n");
debugs(50, DBG_IMPORTANT, "Unable to open UDP socket for logging");
return FALSE;
}
- } else if (comm_connect_addr(ll->fd, &addr)) {
+ } else if (!comm_connect_addr(ll->fd, &addr)) {
if (lf->flags.fatal) {
fatalf("Unable to connect to %s for UDP log: %s\n", lf->path, xstrerror());
} else {