Commit 79d41cbe authored by Michal Vaner's avatar Michal Vaner
Browse files

Fix test

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

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent a73eb2ba
......@@ -54,9 +54,10 @@ class UDPQuery : public ::testing::Test, public asiolink::UDPQuery::Callback {
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),
......@@ -96,7 +97,7 @@ TEST_F(UDPQuery, receive) {
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));;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment