]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not erase the announcement port by assigning an accouncement IP address.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 9 Sep 2008 17:17:33 +0000 (11:17 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 9 Sep 2008 17:17:33 +0000 (11:17 -0600)
With 11(!) assignment operators (not even counting the implicit ones),
no wonder IPAddress assignment semantics gets lost on developers.

src/send-announce.cc

index 2914fbf5a8e0609baa8b62ebd11f919c2e087847..4d94c3b29691747813b8620d1923ccbc6b80aa7f 100644 (file)
@@ -109,8 +109,8 @@ send_announce(const ipcache_addrs * ia, void *junk)
         }
     }
 
-    S.SetPort(port);
     S = ia->in_addrs[0];
+    S.SetPort(port);
     assert(theOutIcpConnection > 0);
     x = comm_udp_sendto(theOutIcpConnection, S, sndbuf, strlen(sndbuf) + 1);