mirror of
https://github.com/curl/curl.git
synced 2026-07-25 18:07:16 +03:00
Starting now, adding an easy handle to a multi stack that was already added
to a multi stack will cause CURLM_BAD_EASY_HANDLE to get returned.
This commit is contained in:
parent
2d38e51867
commit
ab60a12465
4 changed files with 11 additions and 3 deletions
|
|
@ -373,8 +373,10 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
|||
if(!GOOD_EASY_HANDLE(easy_handle))
|
||||
return CURLM_BAD_EASY_HANDLE;
|
||||
|
||||
/* TODO: add some kind of code that prevents a user from being able to
|
||||
add the same handle more than once! */
|
||||
/* Prevent users to add the same handle more than once! */
|
||||
if(((struct SessionHandle *)easy_handle)->multi)
|
||||
/* possibly we should create a new unique error code for this condition */
|
||||
return CURLM_BAD_EASY_HANDLE;
|
||||
|
||||
/* Now, time to add an easy handle to the multi stack */
|
||||
easy = (struct Curl_one_easy *)calloc(sizeof(struct Curl_one_easy), 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue