asyn-thread: fix mutex refs and unused variable in no-HAVE_GETADDRINFO builds
Follow-up to074048ae80#16321 Follow-up to2ee754d830#16323 Closes #16370
This commit is contained in:
parent
67559aa8ce
commit
80d93799a6
@ -336,15 +336,15 @@ CURL_STDCALL gethostbyname_thread(void *arg)
|
|||||||
tsd->sock_error = RESOLVER_ENOMEM;
|
tsd->sock_error = RESOLVER_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_mutex_acquire(tsd->mtx);
|
Curl_mutex_acquire(&tsd->mutx);
|
||||||
if(tsd->done) {
|
if(tsd->done) {
|
||||||
/* too late, gotta clean up the mess */
|
/* too late, gotta clean up the mess */
|
||||||
Curl_mutex_release(tsd->mtx);
|
Curl_mutex_release(&tsd->mutx);
|
||||||
destroy_thread_sync_data(tsd);
|
destroy_thread_sync_data(tsd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tsd->done = TRUE;
|
tsd->done = TRUE;
|
||||||
Curl_mutex_release(tsd->mtx);
|
Curl_mutex_release(&tsd->mutx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -682,8 +682,6 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
|
|||||||
int port,
|
int port,
|
||||||
int *waitp)
|
int *waitp)
|
||||||
{
|
{
|
||||||
struct thread_data *td = &data->state.async.thdata;
|
|
||||||
|
|
||||||
*waitp = 0; /* default to synchronous response */
|
*waitp = 0; /* default to synchronous response */
|
||||||
|
|
||||||
/* fire up a new resolver thread! */
|
/* fire up a new resolver thread! */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user