mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:03:37 +03:00
multi-notify: add check macro
Since Curl_mntfy_dispatch_all() is called with high frequency and mostly unnecessary, add a check macro to avoid the call when not needed. Closes #20034
This commit is contained in:
parent
c85994d53b
commit
d405ac84ea
3 changed files with 9 additions and 3 deletions
|
|
@ -174,6 +174,7 @@ void Curl_mntfy_add(struct Curl_easy *data, unsigned int type)
|
|||
mntfy_chunk_append(tail, data, (uint32_t)type);
|
||||
else
|
||||
multi->ntfy.failure = CURLM_OUT_OF_MEMORY;
|
||||
multi->ntfy.has_entries = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,5 +202,7 @@ CURLMcode Curl_mntfy_dispatch_all(struct Curl_multi *multi)
|
|||
multi->ntfy.failure = CURLM_OK; /* reset, once delivered */
|
||||
return mresult;
|
||||
}
|
||||
else
|
||||
multi->ntfy.has_entries = FALSE;
|
||||
return CURLM_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue