]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove useless address copy from idns
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 20 May 2010 12:00:01 +0000 (00:00 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 20 May 2010 12:00:01 +0000 (00:00 +1200)
src/dns_internal.cc

index 73eaf56d13a5224339ff31dbde54e445c5bd2b19..8ac8cdd9d182ed52040f41b9b284e75609953574 100644 (file)
@@ -736,20 +736,17 @@ idnsInitVC(int ns)
     nsvc *vc = cbdataAlloc(nsvc);
     nameservers[ns].vc = vc;
     vc->ns = ns;
-
-    Ip::Address addr;
-
-    if (!Config.Addrs.udp_outgoing.IsNoAddr())
-        addr = Config.Addrs.udp_outgoing;
-    else
-        addr = Config.Addrs.udp_incoming;
-
     vc->queue = new MemBuf;
     vc->msg = new MemBuf;
     vc->busy = 1;
 
     Comm::Connection *conn = new Comm::Connection;
-    conn->local = addr;
+
+    if (!Config.Addrs.udp_outgoing.IsNoAddr())
+        conn->local = Config.Addrs.udp_outgoing;
+    else
+        conn->local = Config.Addrs.udp_incoming;
+
     conn->remote = nameservers[ns].S;
 
     AsyncCall::Pointer call = commCbCall(78,3, "idnsInitVCConnected", CommConnectCbPtrFun(idnsInitVCConnected, vc));