]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3536] removed empty line in getDBVersions
authorRazvan Becheriu <razvan@isc.org>
Wed, 18 Sep 2024 11:17:16 +0000 (14:17 +0300)
committerRazvan Becheriu <razvan@isc.org>
Thu, 3 Oct 2024 18:04:37 +0000 (21:04 +0300)
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc

index 987cdc56ecf9dffd338b87814450dc77332eb0f9..14929c54accac563939aa618c52ad56eb3ca8e0b 100644 (file)
@@ -5016,11 +5016,17 @@ Dhcpv4Srv::getVersion(bool extended) {
         tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl;
         tmp << "linked with:" << endl;
         tmp << "- " << Logger::getVersion() << endl;
-        tmp << "- " << CryptoLink::getVersion() << endl;
-        tmp << "lease backends:" << endl;
-        tmp << LeaseMgrFactory::getDBVersions() << endl;
-        tmp << "host backends:" << endl;
-        tmp << HostDataSourceFactory::getDBVersions();
+        tmp << "- " << CryptoLink::getVersion();
+        auto info = LeaseMgrFactory::getDBVersions();
+        if (!info.empty()) {
+            tmp << endl <<"lease backends:" << endl;
+            tmp << info;
+        }
+        info = HostDataSourceFactory::getDBVersions();
+        if (!info.empty()) {
+            tmp << endl << "host backends:" << endl;
+            tmp << info;
+        }
         // @todo: more details about database runtime
     }
 
index f2bcbce1e5402b1da28fd204d265a65fd7e7f91b..003ddc514b9d02e3fcaabe8bcec5138df7cdf5f3 100644 (file)
@@ -4693,11 +4693,17 @@ Dhcpv6Srv::getVersion(bool extended) {
         tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl;
         tmp << "linked with:" << endl;
         tmp << "- " << Logger::getVersion() << endl;
-        tmp << "- " << CryptoLink::getVersion() << endl;
-        tmp << "lease backends:" << endl;
-        tmp << LeaseMgrFactory::getDBVersions() << endl;
-        tmp << "host backends:" << endl;
-        tmp << HostDataSourceFactory::getDBVersions();
+        tmp << "- " << CryptoLink::getVersion();
+        auto info = LeaseMgrFactory::getDBVersions();
+        if (!info.empty()) {
+            tmp << endl <<"lease backends:" << endl;
+            tmp << info;
+        }
+        info = HostDataSourceFactory::getDBVersions();
+        if (!info.empty()) {
+            tmp << endl << "host backends:" << endl;
+            tmp << info;
+        }
         // @todo: more details about database runtime
     }