mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
urldata: introduce data->mid, a unique identifier inside a multi
`data->id` is unique in *most* situations, but not in all. If a libcurl application uses more than one connection cache, they will overlap. This is a rare situations, but libcurl apps do crazy things. However, for informative things, like tracing, `data->id` is superior, since it assigns new ids in curl's serial curl_easy_perform() use. Introduce `data->mid` which is a unique identifer inside one multi instance, assigned on multi_add_handle() and cleared on multi_remove_handle(). Use the `mid` in DoH operations and also in h2/h3 stream hashes. Reported-by: 罗朝辉 Fixes #14414 Closes #14499
This commit is contained in:
parent
ad6320b8a5
commit
22d292b3ec
13 changed files with 133 additions and 51 deletions
|
|
@ -153,4 +153,10 @@ CURLcode Curl_multi_xfer_ulbuf_borrow(struct Curl_easy *data,
|
|||
*/
|
||||
void Curl_multi_xfer_ulbuf_release(struct Curl_easy *data, char *buf);
|
||||
|
||||
/**
|
||||
* Get the transfer handle for the given id. Returns NULL if not found.
|
||||
*/
|
||||
struct Curl_easy *Curl_multi_get_handle(struct Curl_multi *multi,
|
||||
curl_off_t id);
|
||||
|
||||
#endif /* HEADER_CURL_MULTIIF_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue