[svn] commit: r3405 - /branches/vorner-recursor-timeouts/src/lib/asiolink/tests/udpdns_unittest.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Oct 31 18:48:54 UTC 2010


Author: vorner
Date: Sun Oct 31 18:48:54 2010
New Revision: 3405

Log:
Fix test

It passed the data as value, not reference, therefore there was old
(default) endpoint. Stupid boost::bind.

Modified:
    branches/vorner-recursor-timeouts/src/lib/asiolink/tests/udpdns_unittest.cc

Modified: branches/vorner-recursor-timeouts/src/lib/asiolink/tests/udpdns_unittest.cc
==============================================================================
--- branches/vorner-recursor-timeouts/src/lib/asiolink/tests/udpdns_unittest.cc (original)
+++ branches/vorner-recursor-timeouts/src/lib/asiolink/tests/udpdns_unittest.cc Sun Oct 31 18:48:54 2010
@@ -54,9 +54,10 @@
             EXPECT_EQ(expected, result);
             run = true;
         }
-        void respond(udp::endpoint& remote, udp::socket* socket) {
+        void respond(udp::endpoint* remote, udp::socket* socket) {
             // Some data came, just send something back.
-            socket->send_to(asio::buffer(TEST_DATA, sizeof TEST_DATA), remote);
+            socket->send_to(asio::buffer(TEST_DATA, sizeof TEST_DATA),
+                *remote);
             socket->close();
         }
 };
@@ -96,7 +97,7 @@
     char inbuff[512];
     udp::endpoint remote;
     socket.async_receive_from(asio::buffer(inbuff, 512), remote, boost::bind(
-        &UDPQuery::respond, this, remote, &socket));
+        &UDPQuery::respond, this, &remote, &socket));
     service.post(query);
     service.run();
     EXPECT_TRUE(run);




More information about the bind10-changes mailing list