lock dns only
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/pr-master This commit looks good

This commit is contained in:
2025-07-23 10:08:17 -05:00
parent ae7538b241
commit 3bfbaa408c

View File

@@ -43,8 +43,12 @@ void dns_cache::init() {
cache_.reset(cache); cache_.reset(cache);
} }
void dns_cache::lock_callback(CURL * /* curl */, curl_lock_data /* data */, void dns_cache::lock_callback(CURL * /* curl */, curl_lock_data data,
curl_lock_access /* access */, void * /* ptr */) { curl_lock_access /* access */, void * /* ptr */) {
if (data != CURL_LOCK_DATA_DNS) {
return;
}
lock_->lock(); lock_->lock();
} }
@@ -52,9 +56,13 @@ void dns_cache::set_cache(CURL *curl) {
curl_easy_setopt(curl, CURLOPT_SHARE, cache_.get()); curl_easy_setopt(curl, CURLOPT_SHARE, cache_.get());
} }
void dns_cache::unlock_callback(CURL * /* curl */, curl_lock_data /* data */, void dns_cache::unlock_callback(CURL * /* curl */, curl_lock_data data,
curl_lock_access /* access */, curl_lock_access /* access */,
void * /* ptr */) { void * /* ptr */) {
if (data != CURL_LOCK_DATA_DNS) {
return;
}
lock_->unlock(); lock_->unlock();
} }
} // namespace repertory } // namespace repertory