/// @brief Tries to acquires a client.
///
/// Lookup the client:
- /// - if not found insert the client in the clients map and return true
- /// - if found put the continuation in the holder and return false
+ /// - if not found insert the client in the clients map and return false
+ /// - if found and has a continuation put the continuation in the holder
+ /// and return false
+ /// - if found and has no continuation return true
///
/// @param query The query from the client.
/// @param cont The continuation in the case the client was held.
- /// @return true if the client was acquired, false if there is already
+ /// @return false if the client was acquired, true if there is already
/// a query from the same client.
bool tryLock(Pkt4Ptr query, ContinuationPtr cont = ContinuationPtr());
/// @brief Tries to acquires a client.
///
/// Lookup the client:
- /// - if not found insert the client in the clients map and return true
- /// - if found put the continuation in the holder and return false
+ /// - if not found insert the client in the clients map and return false
+ /// - if found and has a continuation put the continuation in the holder
+ /// and return false
+ /// - if found and has no continuation return true
///
/// @param query The query from the client.
/// @param cont The continuation in the case the client was held.
- /// @return true if the client was acquired, false if there is already
+ /// @return false if the client was acquired, true if there is already
/// a query from the same client.
bool tryLock(Pkt6Ptr query, ContinuationPtr cont = ContinuationPtr());
endif
libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
+libkea_dhcpsrv_la_SOURCES += resource_handler.cc resource_handler.h
libkea_dhcpsrv_la_SOURCES += sanity_checker.cc sanity_checker.h
libkea_dhcpsrv_la_SOURCES += shared_network.cc shared_network.h
libkea_dhcpsrv_la_SOURCES += srv_config.cc srv_config.h
network.h \
network_state.h \
pool.h \
+ resource_handler.h \
sanity_checker.h \
shared_network.h \
srv_config.h \
} else {
// single-threaded
if (mgr_.pool_->pool_.empty()) {
- isc_throw(Unexpected, "No available MySQL lease context?!");
+ isc_throw(Unexpected, "No available MySQL host context?!");
}
ctx_ = mgr_.pool_->pool_.back();
}
} else {
// single-threaded
if (mgr_.pool_->pool_.empty()) {
- isc_throw(Unexpected, "No available PostgreSQL lease context?!");
+ isc_throw(Unexpected, "No available PostgreSQL host context?!");
}
ctx_ = mgr_.pool_->pool_.back();
}
libdhcpsrv_unittests_SOURCES += cql_host_data_source_unittest.cc
endif
libdhcpsrv_unittests_SOURCES += pool_unittest.cc
+libdhcpsrv_unittests_SOURCES += resource_handler_unittest.cc
libdhcpsrv_unittests_SOURCES += sanity_checks_unittest.cc
libdhcpsrv_unittests_SOURCES += shared_network_parser_unittest.cc
libdhcpsrv_unittests_SOURCES += shared_network_unittest.cc