move Curl_share_lock and ref counting into Curl_fetch_addr
This commit is contained in:

committed by
Daniel Stenberg

parent
0db831976e
commit
b4be97fb67
@@ -1112,13 +1112,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||
struct connectdata *conn = data->easy_conn;
|
||||
|
||||
/* check if we have the name resolved by now */
|
||||
if(data->share)
|
||||
Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
|
||||
|
||||
dns = Curl_fetch_addr(conn, conn->host.name, (int)conn->port);
|
||||
|
||||
if(dns) {
|
||||
dns->inuse++; /* we use it! */
|
||||
#ifdef CURLRES_ASYNCH
|
||||
conn->async.dns = dns;
|
||||
conn->async.done = TRUE;
|
||||
@@ -1127,9 +1123,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||
infof(data, "Hostname was found in DNS cache\n");
|
||||
}
|
||||
|
||||
if(data->share)
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||
|
||||
if(!dns)
|
||||
result = Curl_resolver_is_resolved(data->easy_conn, &dns);
|
||||
|
||||
|
Reference in New Issue
Block a user