BIND 10 trac2853, updated. dde7e27a9effb9702e99f2145254ae13821d7667 [2853] Use info.ztable_segment_ as indicator of unused segment

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Jun 12 15:14:10 UTC 2013


The branch, trac2853 has been updated
       via  dde7e27a9effb9702e99f2145254ae13821d7667 (commit)
      from  bd3f52daf52aeeb006cc7ac420f11bdc9cd284ed (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 dde7e27a9effb9702e99f2145254ae13821d7667
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Jun 12 20:43:12 2013 +0530

    [2853] Use info.ztable_segment_ as indicator of unused segment

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

Summary of changes:
 src/lib/datasrc/client_list.cc |   21 +++++++--------------
 src/lib/datasrc/client_list.h  |    2 +-
 2 files changed, 8 insertions(+), 15 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/client_list.cc b/src/lib/datasrc/client_list.cc
index d1bef5a..58444b7 100644
--- a/src/lib/datasrc/client_list.cc
+++ b/src/lib/datasrc/client_list.cc
@@ -410,22 +410,15 @@ vector<DataSourceStatus>
 ConfigurableClientList::getStatus() const {
     vector<DataSourceStatus> result;
     BOOST_FOREACH(const DataSourceInfo& info, data_sources_) {
-        MemorySegmentState segment_state = SEGMENT_UNUSED;
-        if (info.cache_) {
-            if (info.ztable_segment_ && info.ztable_segment_->isUsable()) {
-                segment_state = SEGMENT_INUSE;
-            } else {
-                segment_state = SEGMENT_WAITING;
-            }
-        }
-
-        std::string segment_type;
         if (info.ztable_segment_) {
-            segment_type = info.ztable_segment_->getImplType();
+            result.push_back(DataSourceStatus(
+                info.name_,
+                (info.ztable_segment_->isUsable() ?
+                 SEGMENT_INUSE : SEGMENT_WAITING),
+                info.ztable_segment_->getImplType()));
+        } else {
+            result.push_back(DataSourceStatus(info.name_, SEGMENT_UNUSED));
         }
-
-        result.push_back(DataSourceStatus(info.name_, segment_state,
-                                          segment_type));
     }
     return (result);
 }
diff --git a/src/lib/datasrc/client_list.h b/src/lib/datasrc/client_list.h
index b3ac9b3..880679a 100644
--- a/src/lib/datasrc/client_list.h
+++ b/src/lib/datasrc/client_list.h
@@ -84,7 +84,7 @@ public:
     /// Sets initial values. It doesn't matter what is provided for the type
     /// if state is SEGMENT_UNUSED, the value is effectively ignored.
     DataSourceStatus(const std::string& name, MemorySegmentState state,
-                     const std::string& type) :
+                     const std::string& type = std::string()) :
         name_(name),
         type_(type),
         state_(state)



More information about the bind10-changes mailing list