BIND 10 trac2850_2, updated. 3456e30bce45c286b120d176a517ca88e9e21b1c [2850] Don't declare a global static std::string object to avoid init fiasco

BIND 10 source code commits bind10-changes at lists.isc.org
Fri May 3 01:33:37 UTC 2013


The branch, trac2850_2 has been updated
       via  3456e30bce45c286b120d176a517ca88e9e21b1c (commit)
       via  4325f3dfd81569be4ef09a84cf0fb74246a5b666 (commit)
       via  74bad1ad71292fa998f14ad3953236f7e979efac (commit)
       via  035fbe1da0e77a45d108046e5399c5a676e098a8 (commit)
      from  5d65c74c127243790200028375786fced2bd1ad7 (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 3456e30bce45c286b120d176a517ca88e9e21b1c
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri May 3 07:02:36 2013 +0530

    [2850] Don't declare a global static std::string object to avoid init fiasco

commit 4325f3dfd81569be4ef09a84cf0fb74246a5b666
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri May 3 06:59:38 2013 +0530

    [2850] Remove TearDown() method from ZoneTableSegmentMappedTest

commit 74bad1ad71292fa998f14ad3953236f7e979efac
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri May 3 06:56:41 2013 +0530

    [2850] Clarify API doc about exceptions in ZoneWriter::cleanup()

commit 035fbe1da0e77a45d108046e5399c5a676e098a8
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri May 3 06:54:29 2013 +0530

    [2850] Fix ZoneWriter constructor API doc

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

Summary of changes:
 src/lib/datasrc/memory/zone_writer.h               |    4 ++--
 .../memory/zone_table_segment_mapped_unittest.cc   |   11 ++++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_writer.h b/src/lib/datasrc/memory/zone_writer.h
index 816370e..1c4e944 100644
--- a/src/lib/datasrc/memory/zone_writer.h
+++ b/src/lib/datasrc/memory/zone_writer.h
@@ -46,7 +46,7 @@ public:
     ///
     /// \param segment The zone table segment to store the zone into.
     /// \param load_action The callback used to load data.
-    /// \param install_action The callback used to install the loaded zone.
+    /// \param name The name of the zone.
     /// \param rrclass The class of the zone.
     ZoneWriter(ZoneTableSegment& segment,
                const LoadAction& load_action, const dns::Name& name,
@@ -96,7 +96,7 @@ public:
     /// one loaded by load() in case install() was not called or was not
     /// successful, or the one replaced in install().
     ///
-    /// Generally, this should never throw.
+    /// \throw none
     void cleanup();
 
 private:
diff --git a/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc b/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
index ff8445a..cd9510e 100644
--- a/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
@@ -28,7 +28,7 @@ using boost::scoped_ptr;
 
 namespace {
 
-const std::string mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
+const char* mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
 
 class ZoneTableSegmentMappedTest : public ::testing::Test {
 protected:
@@ -36,7 +36,8 @@ protected:
         ztable_segment_(
             ZoneTableSegment::create(RRClass::IN(), "mapped")),
         config_params_(
-            Element::fromJSON("{\"mapped-file\": \"" + mapped_file + "\"}"))
+            Element::fromJSON(
+                "{\"mapped-file\": \"" + std::string(mapped_file) + "\"}"))
     {
         EXPECT_NE(static_cast<void*>(NULL), ztable_segment_);
         // Verify that a ZoneTableSegmentMapped is created.
@@ -46,12 +47,8 @@ protected:
     }
 
     ~ZoneTableSegmentMappedTest() {
-        boost::interprocess::file_mapping::remove(mapped_file.c_str());
-    }
-
-    void TearDown() {
         ZoneTableSegment::destroy(ztable_segment_);
-        ztable_segment_ = NULL;
+        boost::interprocess::file_mapping::remove(mapped_file);
     }
 
     ZoneTableSegment* ztable_segment_;



More information about the bind10-changes mailing list