Commit 3016b711 authored by Francis Dupont's avatar Francis Dupont
Browse files

[5533a] Reviewed comment changes

parent 24237f9d
premium @ a7fc174b
Subproject commit 02dfa841546e3ab44e5cc8d55c82e0e5af8cbb7a Subproject commit a7fc174b6a6dc556fbbea79dc267f458bd7e3a79
...@@ -75,7 +75,8 @@ HostDataSourceFactory::add(HostDataSourceList& sources, ...@@ -75,7 +75,8 @@ HostDataSourceFactory::add(HostDataSourceList& sources,
} }
bool 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) { for (auto it = sources.begin(); it != sources.end(); ++it) {
if ((*it)->getType() != db_type) { if ((*it)->getType() != db_type) {
continue; continue;
......
...@@ -172,7 +172,7 @@ HostMgr::get4Any(const SubnetID& subnet_id, ...@@ -172,7 +172,7 @@ HostMgr::get4Any(const SubnetID& subnet_id,
ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type, ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type,
identifier_begin, identifier_len); 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. // Then we're done here.
if (host || alternate_sources_.empty()) { if (host || alternate_sources_.empty()) {
return (host); return (host);
...@@ -212,6 +212,7 @@ HostMgr::get4Any(const SubnetID& subnet_id, ...@@ -212,6 +212,7 @@ HostMgr::get4Any(const SubnetID& subnet_id,
.arg(subnet_id) .arg(subnet_id)
.arg(Host::getIdentifierAsText(identifier_type, identifier_begin, .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
identifier_len)); identifier_len));
// @todo: remove this
if (negative_caching_) { if (negative_caching_) {
cacheNegative(subnet_id, SubnetID(0), cacheNegative(subnet_id, SubnetID(0),
identifier_type, identifier_begin, identifier_len); identifier_type, identifier_begin, identifier_len);
...@@ -357,6 +358,7 @@ HostMgr::get6Any(const SubnetID& subnet_id, ...@@ -357,6 +358,7 @@ HostMgr::get6Any(const SubnetID& subnet_id,
.arg(Host::getIdentifierAsText(identifier_type, identifier_begin, .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
identifier_len)); identifier_len));
// @todo: remove this
if (negative_caching_) { if (negative_caching_) {
cacheNegative(SubnetID(0), subnet_id, cacheNegative(SubnetID(0), subnet_id,
identifier_type, identifier_begin, identifier_len); identifier_type, identifier_begin, identifier_len);
......
...@@ -393,9 +393,9 @@ public: ...@@ -393,9 +393,9 @@ public:
protected: protected:
/// @brief The negative caching flag. /// @brief The negative caching flag.
/// ///
/// When true and the first cache source will be also /// When true and the first backend is a cache
/// caching negative answers. This works for get[46] /// negative answers are inserted in the cache.
/// for a subnet and an identifier. /// This works for get[46] for a subnet and an identifier.
bool negative_caching_; bool negative_caching_;
/// @brief Cache an answer. /// @brief Cache an answer.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment