]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3449] Cherry-pick of compilarion fix from Bundy tree
authorTomek Mrugalski <tomasz@isc.org>
Sat, 10 May 2014 10:23:34 +0000 (12:23 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Sat, 10 May 2014 10:23:34 +0000 (12:23 +0200)
[mavericks] fix trivial build errors

Conflicts:
src/lib/util/csv_file.cc
src/lib/util/csv_file.h

src/bin/d2/tests/nc_test_utils.cc
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/lib/dhcp/option_custom.cc
src/lib/dhcp/option_custom.h
src/lib/dns/tests/labelsequence_unittest.cc

index 957688aad630c2b77bd64e03a2023184c598ab79..2799b1c3dc6a849416fbfa41c41da18fea807a22 100644 (file)
@@ -31,7 +31,6 @@ namespace d2 {
 const char* TEST_DNS_SERVER_IP = "127.0.0.1";
 size_t TEST_DNS_SERVER_PORT = 5301;
 
-const bool HAS_RDATA = true;
 const bool NO_RDATA = false;
 
 //*************************** FauxServer class ***********************
index 0f73c860e7a9b91e148d7e96dfb9de350f451c5b..a332cbb5eb38624ec9dc32b7e07715332b14db5b 100644 (file)
@@ -1706,9 +1706,6 @@ TEST_F(Dhcpv4SrvTest, nextServerGlobal) {
 }
 
 
-// a dummy MAC address
-const uint8_t dummyMacAddr[] = {0, 1, 2, 3, 4, 5};
-
 // A dummy MAC address, padded with 0s
 const uint8_t dummyChaddr[16] = {0, 1, 2, 3, 4, 5, 0, 0,
                                  0, 0, 0, 0, 0, 0, 0, 0 };
index 0709d201100aa9f00f0efd980b273b5a29a6d595..849b76d8dd90f0cdc7d7ae5b5bd61bf9363bf53a 100644 (file)
@@ -81,36 +81,6 @@ OptionCustom::checkIndex(const uint32_t index) const {
     }
 }
 
-template<typename T>
-void
-OptionCustom::checkDataType(const uint32_t index) const {
-    // Check that the requested return type is a supported integer.
-    if (!OptionDataTypeTraits<T>::integer_type) {
-        isc_throw(isc::dhcp::InvalidDataType, "specified data type"
-                  " is not a supported integer type.");
-    }
-
-    // Get the option definition type.
-    OptionDataType data_type = definition_.getType();
-    if (data_type == OPT_RECORD_TYPE) {
-        const OptionDefinition::RecordFieldsCollection& record_fields =
-            definition_.getRecordFields();
-        // When we initialized buffers we have already checked that
-        // the number of these buffers is equal to number of option
-        // fields in the record so the condition below should be met.
-        assert(index < record_fields.size());
-        // Get the data type to be returned.
-        data_type = record_fields[index];
-    }
-
-    if (OptionDataTypeTraits<T>::type != data_type) {
-        isc_throw(isc::dhcp::InvalidDataType,
-                  "specified data type " << data_type << " does not"
-                  " match the data type in an option definition for field"
-                  " index " << index);
-    }
-}
-
 void
 OptionCustom::createBuffers() {
     definition_.validate();
index 6ae0b1837ccdddc4a2348fbcd9e38f49ad989155..14cb08c5f046f3346380ff7277c8ee1e907b5956 100644 (file)
@@ -353,6 +353,35 @@ private:
 /// A pointer to the OptionCustom object.
 typedef boost::shared_ptr<OptionCustom> OptionCustomPtr;
 
+template<typename T>
+void
+OptionCustom::checkDataType(const uint32_t index) const {
+    // Check that the requested return type is a supported integer.
+    if (!OptionDataTypeTraits<T>::integer_type) {
+        isc_throw(isc::dhcp::InvalidDataType, "specified data type"
+                  " is not a supported integer type.");
+    }
+
+    // Get the option definition type.
+    OptionDataType data_type = definition_.getType();
+    if (data_type == OPT_RECORD_TYPE) {
+        const OptionDefinition::RecordFieldsCollection& record_fields =
+            definition_.getRecordFields();
+        // When we initialized buffers we have already checked that
+        // the number of these buffers is equal to number of option
+        // fields in the record so the condition below should be met.
+        assert(index < record_fields.size());
+        // Get the data type to be returned.
+        data_type = record_fields[index];
+    }
+
+    if (OptionDataTypeTraits<T>::type != data_type) {
+        isc_throw(isc::dhcp::InvalidDataType,
+                  "specified data type " << data_type << " does not"
+                  " match the data type in an option definition for field"
+                  " index " << index);
+    }
+}
 } // namespace isc::dhcp
 } // namespace isc
 
index c211a4b89714682ba2e6c9f4507502bb32eb0be9..2d0f256763df3abf73848e35080576288414a790 100644 (file)
@@ -649,13 +649,6 @@ const char* const root_servers[] = {
     "j.root-servers.net", "k.root-servers.net", "l.root-servers.net",
     "m.root-servers.net", NULL
 };
-const char* const gtld_servers[] = {
-    "a.gtld-servers.net", "b.gtld-servers.net", "c.gtld-servers.net",
-    "d.gtld-servers.net", "e.gtld-servers.net", "f.gtld-servers.net",
-    "g.gtld-servers.net", "h.gtld-servers.net", "i.gtld-servers.net",
-    "j.gtld-servers.net", "k.gtld-servers.net", "l.gtld-servers.net",
-    "m.gtld-servers.net", NULL
-};
 const char* const jp_servers[] = {
     "a.dns.jp", "b.dns.jp", "c.dns.jp", "d.dns.jp", "e.dns.jp",
     "f.dns.jp", "g.dns.jp", NULL