BIND 10 trac931_2, updated. e37672ef8e814456d53772220d885c91941db7bd [trac931] corrected a confusing comment in addRemoteConfig(). added some comments about how the remote config value is retrieved in a test case.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue May 24 20:09:06 UTC 2011


The branch, trac931_2 has been updated
       via  e37672ef8e814456d53772220d885c91941db7bd (commit)
      from  ec6446047b5007290ca4d6d31e67239c424f33bb (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 e37672ef8e814456d53772220d885c91941db7bd
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue May 24 13:07:50 2011 -0700

    [trac931] corrected a confusing comment in addRemoteConfig().
    added some comments about how the remote config value is retrieved
    in a test case.

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

Summary of changes:
 src/lib/config/ccsession.cc                 |    2 +-
 src/lib/config/tests/ccsession_unittests.cc |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/config/ccsession.cc b/src/lib/config/ccsession.cc
index d8303d9..7734f99 100644
--- a/src/lib/config/ccsession.cc
+++ b/src/lib/config/ccsession.cc
@@ -429,7 +429,7 @@ ModuleCCSession::addRemoteConfig(const std::string& spec_name,
     ConstElementPtr new_config = parseAnswer(rcode, answer);
     ElementPtr local_config;
     if (rcode == 0 && new_config) {
-        // Merge the received config into the defaults
+        // Merge the received config into existing local config
         local_config = rmod_config.getLocalConfig();
         isc::data::merge(local_config, new_config);
         rmod_config.setLocalConfig(local_config);
diff --git a/src/lib/config/tests/ccsession_unittests.cc b/src/lib/config/tests/ccsession_unittests.cc
index 44c9bfa..0d1df96 100644
--- a/src/lib/config/tests/ccsession_unittests.cc
+++ b/src/lib/config/tests/ccsession_unittests.cc
@@ -427,7 +427,7 @@ TEST_F(CCSessionTest, remoteConfig) {
         EXPECT_NO_THROW(module_name = mccs.addRemoteConfig("Spec2", NULL,
                                                            false));
 
-        size_t qsize(session.getMsgQueue()->size());
+        const size_t qsize(session.getMsgQueue()->size());
         EXPECT_TRUE(session.getMsgQueue()->get(qsize - 2)->equals(*el(
             "[ \"ConfigManager\", \"*\", { \"command\": ["
             "\"get_module_spec\", { \"module_name\": \"Spec2\" } ] } ]")));
@@ -435,6 +435,8 @@ TEST_F(CCSessionTest, remoteConfig) {
             "[ \"ConfigManager\", \"*\", { \"command\": [ \"get_config\","
             "{ \"module_name\": \"Spec2\" } ] } ]")));
         EXPECT_EQ("Spec2", module_name);
+        // Since we returned an empty local config above, the default value
+        // for "item1", which is 1, should be used.
         EXPECT_NO_THROW(item1 =
                         mccs.getRemoteConfigValue(module_name,
                                                   "item1")->intValue());




More information about the bind10-changes mailing list