BIND 10 trac2209, updated. 7900248aec3191e202066f5dfaad98f6469c32df [2209] Typo

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Oct 26 14:25:24 UTC 2012


The branch, trac2209 has been updated
       via  7900248aec3191e202066f5dfaad98f6469c32df (commit)
       via  0c8f4961f3f2b8884e5567e51bf629016a35e9d7 (commit)
      from  dcf59e93fadc2df047e4cb9dba138ffc0f619d3e (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 7900248aec3191e202066f5dfaad98f6469c32df
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Fri Oct 26 16:21:28 2012 +0200

    [2209] Typo

commit 0c8f4961f3f2b8884e5567e51bf629016a35e9d7
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Fri Oct 26 16:08:18 2012 +0200

    [2209] Rewrite the reload() wrapper
    
    Some people found the previous hard to follow.

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

Summary of changes:
 src/lib/datasrc/client_list.cc                |   14 +++++++++-----
 src/lib/datasrc/tests/client_list_unittest.cc |    4 ++--
 2 files changed, 11 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/client_list.cc b/src/lib/datasrc/client_list.cc
index 21b147e..dafac9e 100644
--- a/src/lib/datasrc/client_list.cc
+++ b/src/lib/datasrc/client_list.cc
@@ -346,12 +346,16 @@ ConfigurableClientList::findInternal(MutableResult& candidate,
 ConfigurableClientList::ReloadResult
 ConfigurableClientList::reload(const Name& name) {
     const ZoneWriterPair result(getCachedZoneWriter(name));
-    if (result.second) {
-        result.second->load();
-        result.second->install();
-        result.second->cleanup();
+    if (result.first != ZONE_SUCCESS) {
+        return (result.first);
     }
-    return (result.first);
+
+    assert(result.second);
+    result.second->load();
+    result.second->install();
+    result.second->cleanup();
+
+    return (ZONE_SUCCESS);
 }
 
 namespace {
diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc
index 0c95350..a185a95 100644
--- a/src/lib/datasrc/tests/client_list_unittest.cc
+++ b/src/lib/datasrc/tests/client_list_unittest.cc
@@ -847,7 +847,7 @@ TEST_F(ListTest, BadMasterFile) {
 
 // This allows us to test two versions of the reloading code
 // (One by calling reload(), one by obtaining a ZoneWriter and
-// plaping with that). Once we deprecate reload(), we should revert this
+// playing with that). Once we deprecate reload(), we should revert this
 // change and not use typed tests any more.
 template<class UpdateType>
 class ReloadTest : public ListTest {
@@ -871,7 +871,7 @@ ReloadTest<WriterUpdateType>::doReload(const Name& origin) {
     ConfigurableClientList::ZoneWriterPair
         result(list_->getCachedZoneWriter(origin));
     if (result.first == ConfigurableClientList::ZONE_SUCCESS) {
-        // Can't use ASSERT_NE here, it would wan't to return(), which
+        // Can't use ASSERT_NE here, it would want to return(), which
         // it can't in non-void function.
         if (result.second) {
             result.second->load();



More information about the bind10-changes mailing list