BIND 10 trac499, updated. ba92da6356b8d3a5b164102af9d8d22259efccc9 [trac499] Return data back to the client in udpSendReceive test
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 9 19:19:53 UTC 2011
The branch, trac499 has been updated
via ba92da6356b8d3a5b164102af9d8d22259efccc9 (commit)
from 7c38ee8fabb2f93c83495e45c58a37712da25e67 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ba92da6356b8d3a5b164102af9d8d22259efccc9
Author: Stephen Morris <stephen at isc.org>
Date: Wed Mar 9 11:17:35 2011 -0800
[trac499] Return data back to the client in udpSendReceive test
In a previous change, nothing was being returned to the client in
the UDOP send/receive test. This was only detected on the Mac.
This change fixes that problem.
-----------------------------------------------------------------------
Summary of changes:
src/lib/asiolink/tests/io_fetch_unittest.cc | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/asiolink/tests/io_fetch_unittest.cc b/src/lib/asiolink/tests/io_fetch_unittest.cc
index d1f0275..901df45 100644
--- a/src/lib/asiolink/tests/io_fetch_unittest.cc
+++ b/src/lib/asiolink/tests/io_fetch_unittest.cc
@@ -166,6 +166,10 @@ public:
// Return a message back to the IOFetch object.
socket->send_to(asio::buffer(return_data_.c_str(), return_data_.size()),
*remote);
+ if (debug_) {
+ cout << "udpReceiveHandler(): returned " << return_data_.size() <<
+ " bytes to the client" << endl;
+ }
}
/// \brief Completion Handler for accepting TCP data
@@ -510,6 +514,7 @@ TEST_F(IOFetchTest, UdpSendReceive) {
udp::socket socket(service_.get_io_service(), udp::v4());
socket.set_option(socket_base::reuse_address(true));
socket.bind(udp::endpoint(TEST_HOST, TEST_PORT));
+ return_data_ = "Message returned to the client";
udp::endpoint remote;
socket.async_receive_from(asio::buffer(receive_buffer_, sizeof(receive_buffer_)),
@@ -517,6 +522,10 @@ TEST_F(IOFetchTest, UdpSendReceive) {
boost::bind(&IOFetchTest::udpReceiveHandler, this, &remote, &socket,
_1, _2));
service_.get_io_service().post(udp_fetch_);
+ if (debug_) {
+ cout << "udpSendReceive: async_receive_from posted, waiting for callback" <<
+ endl;
+ }
service_.run();
socket.close();
More information about the bind10-changes
mailing list