mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:43:31 +03:00
asyn-thread: do not allocate thread_data separately
Put the full struct into Curl_async since it will be used for every name resolve anyway. Closes #16241
This commit is contained in:
parent
48f6bfa8c7
commit
d9fc64d3ab
5 changed files with 188 additions and 208 deletions
|
|
@ -49,7 +49,6 @@ struct thread_sync_data {
|
|||
#ifdef HAVE_GETADDRINFO
|
||||
struct addrinfo hints;
|
||||
#endif
|
||||
struct thread_data *td; /* for thread-self cleanup */
|
||||
int port;
|
||||
int sock_error;
|
||||
bool done;
|
||||
|
|
@ -64,6 +63,7 @@ struct thread_data {
|
|||
struct Curl_https_rrinfo hinfo;
|
||||
ares_channel channel;
|
||||
#endif
|
||||
bool init;
|
||||
};
|
||||
|
||||
#elif defined(CURLRES_ARES) /* CURLRES_THREADED */
|
||||
|
|
@ -79,7 +79,7 @@ struct thread_data {
|
|||
#ifdef USE_HTTPSRR
|
||||
struct Curl_https_rrinfo hinfo;
|
||||
#endif
|
||||
char hostname[1];
|
||||
char *hostname;
|
||||
};
|
||||
|
||||
#endif /* CURLRES_ARES */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue