From: Alex Rousskov Date: Mon, 8 Sep 2008 23:52:06 +0000 (-0600) Subject: Fixed typo: Config.Addrs.udp_outgoing was used for the HTCP incoming address. X-Git-Tag: SQUID_3_1_0_1~49^2~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e54a52f07b74118c569ca21c0a6f48a031f2c32;p=thirdparty%2Fsquid.git Fixed typo: Config.Addrs.udp_outgoing was used for the HTCP incoming address. --- diff --git a/src/htcp.cc b/src/htcp.cc index c989abd0bc..74623da4d0 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -1456,19 +1456,18 @@ htcpRecv(int fd, void *data) void htcpInit(void) { - IPAddress sendOn; - if (Config.Port.htcp <= 0) { debugs(31, 1, "HTCP Disabled."); return; } - sendOn = Config.Addrs.udp_outgoing; - sendOn.SetPort(Config.Port.htcp); + + IPAddress incomingAddr = Config.Addrs.udp_incoming; + incomingAddr.SetPort(Config.Port.htcp); enter_suid(); htcpInSocket = comm_open(SOCK_DGRAM, IPPROTO_UDP, - sendOn, + incomingAddr, COMM_NONBLOCKING, "HTCP Socket"); leave_suid(); @@ -1481,10 +1480,13 @@ htcpInit(void) debugs(31, 1, "Accepting HTCP messages on port " << Config.Port.htcp << ", FD " << htcpInSocket << "."); if (!Config.Addrs.udp_outgoing.IsNoAddr()) { + IPAddress outgoingAddr = Config.Addrs.udp_outgoing; + outgoingAddr.SetPort(Config.Port.htcp); + enter_suid(); htcpOutSocket = comm_open(SOCK_DGRAM, IPPROTO_UDP, - sendOn, + outgoingAddr, COMM_NONBLOCKING, "Outgoing HTCP Socket"); leave_suid();