async: DoH improvements

Adds a "meta_hash" to each easy handle for keeping special data during
operations. All meta data set needs to add its destructor callback, so
that meta data gets destroyed properly when the easy handle is cleaned
up or reset.

Add data->master_mid for "sub" transfers that belong to a "master" easy
handle. When a "sub" transfer is done, the corresponding "master" can
add a callback to be invoked. Used in DoH name resolution.

DoH: use easy meta hash to add internal structs for DoH name resolution.
One in each in each probe easy handle. When probes are done, response
data is copied from the probe to the initiating easy.

This allows DoH using transfers and their probes to be cleaned up in any
sequence correctly.

Fold DoH cleanup into the Curl_async_shutdown() and Curl_async_destroy()
functions.

Closes #16384
This commit is contained in:
Stefan Eissing 2025-04-16 13:45:53 +02:00 committed by Daniel Stenberg
parent 8478365e29
commit 1ebd92d0fd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
14 changed files with 357 additions and 138 deletions

View file

@ -47,6 +47,7 @@ my %wl = (
'Curl_creader_def_close' => 'internal api',
'Curl_creader_def_read' => 'internal api',
'Curl_creader_def_total_length' => 'internal api',
'Curl_meta_reset' => 'internal api',
'Curl_trc_dns' => 'internal api',
);