Browse Source

use PACKAGE_STRING (name + version) from config.h instead of hard-coded value in CH TXT version.bind replies

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1749 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
bcde643efc
2 changed files with 5 additions and 2 deletions
  1. 2 1
      src/lib/auth/static_datasrc.cc
  2. 3 1
      src/lib/auth/tests/static_unittest.cc

+ 2 - 1
src/lib/auth/static_datasrc.cc

@@ -94,7 +94,8 @@ StaticDataSrcImpl::StaticDataSrcImpl() :
 
 
     version = RRsetPtr(new RRset(version_name, RRClass::CH(),
     version = RRsetPtr(new RRset(version_name, RRClass::CH(),
                                  RRType::TXT(), RRTTL(0)));
                                  RRType::TXT(), RRTTL(0)));
-    version->addRdata(generic::TXT("BIND10 0.0.0 (pre-alpha)"));
+    //version->addRdata(generic::TXT("BIND10-devel" CONFIG_VERSION));
+    version->addRdata(generic::TXT(PACKAGE_STRING));
 
 
     version_ns = RRsetPtr(new RRset(version_name, RRClass::CH(),
     version_ns = RRsetPtr(new RRset(version_name, RRClass::CH(),
                                     RRType::NS(), RRTTL(0)));
                                     RRType::NS(), RRTTL(0)));

+ 3 - 1
src/lib/auth/tests/static_unittest.cc

@@ -18,6 +18,8 @@
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
 
 
+#include "config.h"
+
 #include <gtest/gtest.h>
 #include <gtest/gtest.h>
 
 
 #include <dns/name.h>
 #include <dns/name.h>
@@ -49,7 +51,7 @@ protected:
     {
     {
         // XXX: the following values can change as release/developers change,
         // XXX: the following values can change as release/developers change,
         // in which case the test code must be updated accordingly.
         // in which case the test code must be updated accordingly.
-        version_data.push_back("BIND10 0.0.0 (pre-alpha)");
+        version_data.push_back(PACKAGE_STRING);
 
 
         // XXX: in addition, the order the following items matter.
         // XXX: in addition, the order the following items matter.
         authors_data.push_back("Evan Hunt");
         authors_data.push_back("Evan Hunt");