BIND 10 master, updated. 214b2747a3213b7267a4a8a597d07851f00fb1c8 [master] Merge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10

BIND 10 source code commits bind10-changes at lists.isc.org
Fri May 3 14:59:40 UTC 2013


The branch, master has been updated
       via  214b2747a3213b7267a4a8a597d07851f00fb1c8 (commit)
       via  fd6c9be84e460ead7e1fd3e0888828854adccb4f (commit)
      from  71be4dc12e4ffee2641ea54f70bd26f16bdc1460 (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 214b2747a3213b7267a4a8a597d07851f00fb1c8
Merge: fd6c9be 71be4dc
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri May 3 07:59:34 2013 -0700

    [master] Merge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10

commit fd6c9be84e460ead7e1fd3e0888828854adccb4f
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri May 3 01:02:41 2013 -0700

    [master] use a wrapper for boost::function to work around sunstudio build issue
    
    it can't handle it if we pass a function object directly to asio function
    (also templated).  okayed on jabber.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/asiodns/sync_udp_server.h |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/asiodns/sync_udp_server.h b/src/lib/asiodns/sync_udp_server.h
index becbb2e..cabc8bb 100644
--- a/src/lib/asiodns/sync_udp_server.h
+++ b/src/lib/asiodns/sync_udp_server.h
@@ -158,9 +158,22 @@ private:
     asio::error_code ec_;
     // The callback functor for internal asynchronous read event.  This is
     // stateless (and it will be copied in the ASIO library anyway), so
-    // can be const
-    const boost::function<void(const asio::error_code&, size_t)>
-    recv_callback_;
+    // can be const.
+    // SunStudio doesn't like a boost::function object to be passed, so
+    // we use the wrapper class as a workaround.
+    class CallbackWrapper {
+    public:
+        CallbackWrapper(boost::function<void(const asio::error_code&, size_t)>
+                        callback) :
+            callback_(callback)
+        {}
+        void operator()(const asio::error_code& error, size_t len) {
+            callback_(error, len);
+        }
+    private:
+        boost::function<void(const asio::error_code&, size_t)> callback_;
+    };
+    const CallbackWrapper recv_callback_;
 
     // Auxiliary functions
 



More information about the bind10-changes mailing list