multi: allow user callbacks to call curl_multi_assign

Several years ago a change was made to block user callbacks from calling
back into the API when not supported (recursive calls). One of the calls
blocked was curl_multi_assign. Recently the blocking was extended to the
multi interface API, however curl_multi_assign may need to be called
from within those user callbacks (eg CURLMOPT_SOCKETFUNCTION).

I can't think of any callback where it would be unsafe to call
curl_multi_assign so I removed the restriction entirely.

Reported-by: Michael Wallner

Ref: b46cfbc
Ref: 340bb19

Fixes https://github.com/curl/curl/issues/8480
Closes https://github.com/curl/curl/pull/8483
This commit is contained in:
Jay Satiro 2022-02-20 16:04:07 -05:00
parent ccc2752ce8
commit e0dc9765a7
2 changed files with 2 additions and 3 deletions

View file

@ -3571,9 +3571,6 @@ CURLMcode curl_multi_assign(struct Curl_multi *multi, curl_socket_t s,
{
struct Curl_sh_entry *there = NULL;
if(multi->in_callback)
return CURLM_RECURSIVE_API_CALL;
there = sh_getentry(&multi->sockhash, s);
if(!there)