make value for CURLMOPT_NETWORK_CHANGED a bitmask with defined constants

This commit is contained in:
Stefan Eissing 2025-06-25 09:31:03 +02:00
parent 918944cf57
commit 1e88ce5f45
No known key found for this signature in database
5 changed files with 34 additions and 16 deletions

View file

@ -3237,12 +3237,10 @@ CURLMcode curl_multi_setopt(CURLM *m,
break;
case CURLMOPT_NETWORK_CHANGED: {
long val = va_arg(param, long);
if(val >= 2) {
/* clear DNS cache */
if(val & CURLM_NWCOPT_CLEAR_DNS) {
Curl_dnscache_clear(multi->admin);
}
if(val >= 1) {
/* do not reuse existing connections */
if(val & CURLM_NWCOPT_CLEAR_CONNS) {
Curl_cpool_nw_changed(multi->admin);
}
break;