Browse Source

[master] create a real instance of IOMessage and pass it to lookup DNS callback

some compilers complained about it if we pass a temporary, as they try to
copy it (IOMessage is nonopyable)
this should fix some error reports from buildbots
JINMEI Tatuya 12 years ago
parent
commit
05504fc9e5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/asiodns/sync_udp_server.cc

+ 2 - 2
src/lib/asiodns/sync_udp_server.cc

@@ -107,8 +107,8 @@ SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
     resume_called_ = false;
 
     // Call the actual lookup
-    (*lookup_callback_)(IOMessage(data_, length, *udp_socket_, udp_endpoint_),
-                        query_, answer_, output_buffer_, this);
+    const IOMessage message(data_, length, *udp_socket_, udp_endpoint_);
+    (*lookup_callback_)(message, query_, answer_, output_buffer_, this);
 
     if (!resume_called_) {
         isc_throw(isc::Unexpected,