BIND 10 trac2862, updated. da78d2eb08150ae1558904cce44cc1d12f440edd [2862] Pass the update command to the list manager

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jul 12 09:40:23 UTC 2013


The branch, trac2862 has been updated
       via  da78d2eb08150ae1558904cce44cc1d12f440edd (commit)
      from  e9589fb4bb49847625c0005a17d9fc897593d8b7 (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 da78d2eb08150ae1558904cce44cc1d12f440edd
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Fri Jul 12 11:35:07 2013 +0200

    [2862] Pass the update command to the list manager
    
    Pass the sgmtinfo-update command to the client list manager and ack the
    segment when done.
    
    Not tested, as there's interaction with the command channel and threads
    and external modules. Too much plumbing and too little functionality to
    test.

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

Summary of changes:
 src/bin/auth/auth_srv.cc |   25 +++++++++++++++++++++++++
 src/bin/auth/auth_srv.h  |    3 +++
 2 files changed, 28 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 36b495a..9f14ac1 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -972,9 +972,34 @@ AuthSrv::listsReconfigured() {
     const bool has_remote = hasRemoteSegment(impl_->datasrc_clients_mgr_);
     if (has_remote && !impl_->readers_subscribed_) {
         impl_->config_session_->subscribe("SegmentReader");
+        impl_->config_session_->
+            setUnhandledCallback(boost::bind(&AuthSrv::foreignCommand, this,
+                                             _1, _2, _3));
         impl_->readers_subscribed_ = true;
     } else if (!has_remote && impl_->readers_subscribed_) {
         impl_->config_session_->unsubscribe("SegmentReader");
+        impl_->config_session_->
+            setUnhandledCallback(isc::config::ModuleCCSession::
+                                 UnhandledCallback());
         impl_->readers_subscribed_ = false;
     }
 }
+
+void
+AuthSrv::reconfigureDone(ConstElementPtr params) {
+    // ACK the segment
+    impl_->config_session_->
+        groupSendMsg(isc::config::createCommand("sgmtinfo-update-ack",
+                                                params), "MemMgr");
+}
+
+void
+AuthSrv::foreignCommand(const std::string& command, const std::string&,
+                        const ConstElementPtr& params)
+{
+    if (command == "sgmtinfo-update") {
+        impl_->datasrc_clients_mgr_.
+            segmentInfoUpdate(params, boost::bind(&AuthSrv::reconfigureDone,
+                                                  this, params));
+    }
+}
diff --git a/src/bin/auth/auth_srv.h b/src/bin/auth/auth_srv.h
index a57ed0c..1c49d4f 100644
--- a/src/bin/auth/auth_srv.h
+++ b/src/bin/auth/auth_srv.h
@@ -282,6 +282,9 @@ public:
     void listsReconfigured();
 
 private:
+    void reconfigureDone(isc::data::ConstElementPtr request);
+    void foreignCommand(const std::string& command, const std::string&,
+                        const isc::data::ConstElementPtr& params);
     AuthSrvImpl* impl_;
     isc::asiolink::SimpleCallback* checkin_;
     isc::asiodns::DNSLookup* dns_lookup_;



More information about the bind10-changes mailing list