Browse Source

[3882a] Updated extended version code

Francis Dupont 9 years ago
parent
commit
be77596d0f
3 changed files with 15 additions and 15 deletions
  1. 3 3
      src/bin/d2/d_controller.cc
  2. 6 6
      src/bin/dhcp4/dhcp4_srv.cc
  3. 6 6
      src/bin/dhcp6/dhcp6_srv.cc

+ 3 - 3
src/bin/d2/d_controller.cc

@@ -474,12 +474,12 @@ DControllerBase::getVersion(bool extended) {
         tmp << isc::cryptolink::CryptoLink::getVersion() << std::endl;
         tmp << isc::cryptolink::CryptoLink::getVersion() << std::endl;
         tmp << "database:" << std::endl; 
         tmp << "database:" << std::endl; 
 #ifdef HAVE_MYSQL
 #ifdef HAVE_MYSQL
-        tmp << "MySQL backend" << std::endl;
+        tmp << isc::dhcp::MySqlLeaseMgr::getDBVersion() << std::endl;
 #endif
 #endif
 #ifdef HAVE_PGSQL
 #ifdef HAVE_PGSQL
-        tmp << "PostgreSQL backend" << std::endl;
+        tmp << isc::dhcp::PgSqlLeaseMgr::getDBVersion() << std::endl;
 #endif
 #endif
-        tmp << "Memfile backend";
+        tmp << isc::dhcp::Memfile_LeaseMgr::getDBVersion();
 
 
         // @todo: more details about database runtime
         // @todo: more details about database runtime
     }
     }

+ 6 - 6
src/bin/dhcp4/dhcp4_srv.cc

@@ -2272,15 +2272,15 @@ Dhcpv4Srv::getVersion(bool extended) {
         tmp << "linked with:" << endl;
         tmp << "linked with:" << endl;
         tmp << Logger::getVersion() << endl;
         tmp << Logger::getVersion() << endl;
         tmp << CryptoLink::getVersion() << endl;
         tmp << CryptoLink::getVersion() << endl;
+        tmp << "database:" << endl;
 #ifdef HAVE_MYSQL
 #ifdef HAVE_MYSQL
-        tmp << "database: MySQL";
-#else
-#ifdef HAVE_PGSQL
-        tmp << "database: PostgreSQL";
-#else
-        tmp << "no database";
+        tmp << MySqlLeaseMgr::getDBVersion() << endl;
 #endif
 #endif
+#ifdef HAVE_PGSQL
+        tmp << PgSqlLeaseMgr::getDBVersion() << endl;
 #endif
 #endif
+        tmp << Memfile_LeaseMgr::getDBVersion();
+
         // @todo: more details about database runtime
         // @todo: more details about database runtime
     }
     }
 
 

+ 6 - 6
src/bin/dhcp6/dhcp6_srv.cc

@@ -2854,15 +2854,15 @@ Dhcpv6Srv::getVersion(bool extended) {
         tmp << "linked with:" << endl;
         tmp << "linked with:" << endl;
         tmp << Logger::getVersion() << endl;
         tmp << Logger::getVersion() << endl;
         tmp << CryptoLink::getVersion() << endl;
         tmp << CryptoLink::getVersion() << endl;
+        tmp << "database:" << endl;
 #ifdef HAVE_MYSQL
 #ifdef HAVE_MYSQL
-        tmp << "database: MySQL";
-#else
-#ifdef HAVE_PGSQL
-        tmp << "database: PostgreSQL";
-#else
-        tmp << "no database";
+        tmp << MySqlLeaseMgr::getDBVersion() << endl;
 #endif
 #endif
+#ifdef HAVE_PGSQL
+        tmp << PgSqlLeaseMgr::getDBVersion() << endl;
 #endif
 #endif
+        tmp << Memfile_LeaseMgr::getDBVersion();
+
         // @todo: more details about database runtime
         // @todo: more details about database runtime
     }
     }