void
PgSqlHostDataSourceImpl::addResv(const IPv6Resrv& resv,
const HostID& id) {
- thread_local std::shared_ptr<PgSqlIPv6ReservationExchange> host_ipv6_reservation_exchange(
+ std::shared_ptr<PgSqlIPv6ReservationExchange> host_ipv6_reservation_exchange(
std::make_shared<PgSqlIPv6ReservationExchange>());
PsqlBindArrayPtr bind_array;
const std::string& opt_space,
const Optional<SubnetID>&,
const HostID& id) {
- thread_local std::shared_ptr<PgSqlOptionExchange> host_option_exchange(
+ std::shared_ptr<PgSqlOptionExchange> host_option_exchange(
std::make_shared<PgSqlOptionExchange>());
PsqlBindArrayPtr bind_array;
// If operating in read-only mode, throw exception.
impl_->checkReadOnly();
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Initiate PostgreSQL transaction as we will have to make multiple queries
PgSqlHostDataSource::getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv46_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv46_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP4_AND_DHCP6));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAll4(const SubnetID& subnet_id) const {
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAll6(const SubnetID& subnet_id) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAllbyHostname(const std::string& hostname) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv46_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv46_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP4_AND_DHCP6));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAllbyHostname4(const std::string& hostname,
const SubnetID& subnet_id) const {
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAllbyHostname6(const std::string& hostname,
const SubnetID& subnet_id) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
// Set up the WHERE clause value
size_t& /*source_index*/,
uint64_t lower_host_id,
const HostPageSize& page_size) const {
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Set up the WHERE clause value
size_t& /*source_index*/,
uint64_t lower_host_id,
const HostPageSize& page_size) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
// Set up the WHERE clause value
ConstHostCollection
PgSqlHostDataSource::getAll4(const asiolink::IOAddress& address) const {
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Set up the WHERE clause value
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
return (impl_->getHost(subnet_id, identifier_type, identifier_begin,
"wrong address type, address supplied is an IPv6 address");
}
- thread_local std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
+ std::shared_ptr<PgSqlHostWithOptionsExchange> host_ipv4_exchange(
std::make_shared<PgSqlHostWithOptionsExchange>(PgSqlHostWithOptionsExchange::DHCP4_ONLY));
// Set up the WHERE clause value
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
return (impl_->getHost(subnet_id, identifier_type, identifier_begin,
"wrong address type, address supplied is an IPv4 address");
}
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
// Set up the WHERE clause value
"wrong address type, address supplied is an IPv4 address");
}
- thread_local std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
+ std::shared_ptr<PgSqlHostIPv6Exchange> host_ipv6_exchange(
std::make_shared<PgSqlHostIPv6Exchange>(PgSqlHostWithOptionsExchange::DHCP6_ONLY));
// Set up the WHERE clause value
bool
PgSqlLeaseMgr::addLease(const Lease4Ptr& lease) {
- thread_local std::shared_ptr<PgSqlLease4Exchange> exchange4(
+ std::shared_ptr<PgSqlLease4Exchange> exchange4(
std::make_shared<PgSqlLease4Exchange>());
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
bool
PgSqlLeaseMgr::addLease(const Lease6Ptr& lease) {
- thread_local std::shared_ptr<PgSqlLease6Exchange> exchange6(
+ std::shared_ptr<PgSqlLease6Exchange> exchange6(
std::make_shared<PgSqlLease6Exchange>());
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
void
PgSqlLeaseMgr::getLeaseCollection(StatementIndex stindex, db::PsqlBindArray& bind_array,
Lease4Collection& result) const {
- thread_local std::shared_ptr<PgSqlLease4Exchange> exchange4(
+ std::shared_ptr<PgSqlLease4Exchange> exchange4(
std::make_shared<PgSqlLease4Exchange>());
getLeaseCollection(stindex, bind_array, exchange4, result);
void
PgSqlLeaseMgr::getLeaseCollection(StatementIndex stindex, db::PsqlBindArray& bind_array,
Lease6Collection& result) const {
- thread_local std::shared_ptr<PgSqlLease6Exchange> exchange6(
+ std::shared_ptr<PgSqlLease6Exchange> exchange6(
std::make_shared<PgSqlLease6Exchange>());
getLeaseCollection(stindex, bind_array, exchange6, result);
void
PgSqlLeaseMgr::getLease(StatementIndex stindex, PsqlBindArray& bind_array,
Lease4Ptr& result) const {
- thread_local std::shared_ptr<PgSqlLease4Exchange> exchange4(
+ std::shared_ptr<PgSqlLease4Exchange> exchange4(
std::make_shared<PgSqlLease4Exchange>());
// Create appropriate collection object and get all leases matching
void
PgSqlLeaseMgr::getLease(StatementIndex stindex, PsqlBindArray& bind_array,
Lease6Ptr& result) const {
- thread_local std::shared_ptr<PgSqlLease6Exchange> exchange6(
+ std::shared_ptr<PgSqlLease6Exchange> exchange6(
std::make_shared<PgSqlLease6Exchange>());
// Create appropriate collection object and get all leases matching
void
PgSqlLeaseMgr::updateLease4(const Lease4Ptr& lease) {
- thread_local std::shared_ptr<PgSqlLease4Exchange> exchange4(
+ std::shared_ptr<PgSqlLease4Exchange> exchange4(
std::make_shared<PgSqlLease4Exchange>());
const StatementIndex stindex = UPDATE_LEASE4;
void
PgSqlLeaseMgr::updateLease6(const Lease6Ptr& lease) {
- thread_local std::shared_ptr<PgSqlLease6Exchange> exchange6(
+ std::shared_ptr<PgSqlLease6Exchange> exchange6(
std::make_shared<PgSqlLease6Exchange>());
const StatementIndex stindex = UPDATE_LEASE6;