From: Francis Dupont Date: Wed, 7 Mar 2018 13:23:46 +0000 (+0100) Subject: [5533a] Reviewed comment changes X-Git-Tag: trac5527_base~1^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3016b7117e1ed0dd6d0e86bf2fe8d2c9c2e7e535;p=thirdparty%2Fkea.git [5533a] Reviewed comment changes --- diff --git a/premium b/premium index 02dfa84154..a7fc174b6a 160000 --- a/premium +++ b/premium @@ -1 +1 @@ -Subproject commit 02dfa841546e3ab44e5cc8d55c82e0e5af8cbb7a +Subproject commit a7fc174b6a6dc556fbbea79dc267f458bd7e3a79 diff --git a/src/lib/dhcpsrv/host_data_source_factory.cc b/src/lib/dhcpsrv/host_data_source_factory.cc index 08695f5427..d393af61b1 100644 --- a/src/lib/dhcpsrv/host_data_source_factory.cc +++ b/src/lib/dhcpsrv/host_data_source_factory.cc @@ -75,7 +75,8 @@ HostDataSourceFactory::add(HostDataSourceList& sources, } bool -HostDataSourceFactory::del(HostDataSourceList& sources, const string& db_type) { +HostDataSourceFactory::del(HostDataSourceList& sources, + const string& db_type) { for (auto it = sources.begin(); it != sources.end(); ++it) { if ((*it)->getType() != db_type) { continue; diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc index f9783e9807..f1fabdd48b 100644 --- a/src/lib/dhcpsrv/host_mgr.cc +++ b/src/lib/dhcpsrv/host_mgr.cc @@ -172,7 +172,7 @@ HostMgr::get4Any(const SubnetID& subnet_id, ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type, identifier_begin, identifier_len); - // Found it the config file or there are no backends configured? + // Found it in the config file or there are no backends configured? // Then we're done here. if (host || alternate_sources_.empty()) { return (host); @@ -212,6 +212,7 @@ HostMgr::get4Any(const SubnetID& subnet_id, .arg(subnet_id) .arg(Host::getIdentifierAsText(identifier_type, identifier_begin, identifier_len)); + // @todo: remove this if (negative_caching_) { cacheNegative(subnet_id, SubnetID(0), identifier_type, identifier_begin, identifier_len); @@ -357,6 +358,7 @@ HostMgr::get6Any(const SubnetID& subnet_id, .arg(Host::getIdentifierAsText(identifier_type, identifier_begin, identifier_len)); + // @todo: remove this if (negative_caching_) { cacheNegative(SubnetID(0), subnet_id, identifier_type, identifier_begin, identifier_len); diff --git a/src/lib/dhcpsrv/host_mgr.h b/src/lib/dhcpsrv/host_mgr.h index 1727bf20e4..b47944aef3 100644 --- a/src/lib/dhcpsrv/host_mgr.h +++ b/src/lib/dhcpsrv/host_mgr.h @@ -393,9 +393,9 @@ public: protected: /// @brief The negative caching flag. /// - /// When true and the first cache source will be also - /// caching negative answers. This works for get[46] - /// for a subnet and an identifier. + /// When true and the first backend is a cache + /// negative answers are inserted in the cache. + /// This works for get[46] for a subnet and an identifier. bool negative_caching_; /// @brief Cache an answer.