]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed typo: Config.Addrs.udp_outgoing was used for the HTCP incoming address.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 8 Sep 2008 23:52:06 +0000 (17:52 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 8 Sep 2008 23:52:06 +0000 (17:52 -0600)
src/htcp.cc

index c989abd0bc686ebad5853d9f79373de4adc8bb64..74623da4d0891f6f205862708ec542933a26f06c 100644 (file)
@@ -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();