]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2905] preserved existing ZoneNode flag values for ZoneData.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 22 May 2013 18:24:57 +0000 (11:24 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 22 May 2013 18:24:57 +0000 (11:24 -0700)
added a note on the numbering.
and made one piggyback cleanup: define public static const explicitly.

src/lib/datasrc/memory/zone_data.cc
src/lib/datasrc/memory/zone_data.h

index a1d3430e923432037d5f6449d1d36fd6fc1bf124..cdcb683bf00b2a427be94d5eb13223c4cb1b1f96 100644 (file)
@@ -38,6 +38,10 @@ namespace isc {
 namespace datasrc {
 namespace memory {
 
+// Definition of a class static constant.  It's public and its address
+// could be needed by applications, so we need an explicit definition.
+const ZoneNode::Flags ZoneData::DNSSEC_SIGNED;
+
 namespace {
 void
 rdataSetDeleter(RRClass rrclass, util::MemorySegment* mem_sgmt,
index 4d717714ab416a2dbb15a410fd3b7d17c55d7410..b4c65f70fcf3faac836f59f07fd96ab7628ee431 100644 (file)
@@ -378,22 +378,27 @@ private:
     /// It never throws an exception.
     ZoneData(ZoneTree* zone_tree, ZoneNode* origin_node);
 
-    // Zone node flags.
+    // Zone node flags.  When adding a new flag, it's generally advisable to
+    // keep existing values so the binary image of the data is as much
+    // backward compatible as possible.  And it can be helpful in practice
+    // for file-mapped data.
 private:
     // Set in the origin node (which always exists at the same address)
     // to indicate whether the zone is signed or not.  Internal use,
     // so defined as private.
     static const ZoneNode::Flags DNSSEC_SIGNED = ZoneNode::FLAG_USER1;
 
-    // Also set in the origin node, indicating this is a special "empty zone",
-    // that could be created only by the corresponding create() method to be
-    // used for some kind of sentinel data.
-    static const ZoneNode::Flags EMPTY_ZONE = ZoneNode::FLAG_USER2;
 public:
     /// \brief Node flag indicating it is at a "wildcard level"
     ///
     /// This means one of the node's immediate children is a wildcard.
-    static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER3;
+    static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER2;
+
+private:
+    // Also set in the origin node, indicating this is a special "empty zone",
+    // that could be created only by the corresponding create() method to be
+    // used for some kind of sentinel data.
+    static const ZoneNode::Flags EMPTY_ZONE = ZoneNode::FLAG_USER3;
 
 public:
     /// \brief Allocate and construct \c ZoneData.