From: Amos Jeffries Date: Fri, 9 Apr 2010 11:48:21 +0000 (+1200) Subject: Regression in UDP logging portage. X-Git-Tag: SQUID_3_2_0_1~306 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d938215;p=thirdparty%2Fsquid.git Regression in UDP logging portage. --- diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index 5ef9ea99e5..17aaf6f179 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -176,16 +176,16 @@ logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_fla } 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"); @@ -193,7 +193,7 @@ logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_fla 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 {