From 53be8166b2b16d9682a173f505188a79ca30fb11 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 7 Oct 2025 13:40:05 +0200 Subject: [PATCH] multi: notify rename, remove the last stragglers in the public API. Follow-up to 357808f4addef44c2c48f17d Closes #18910 --- docs/libcurl/curl_multi_notify_disable.md | 2 +- docs/libcurl/curl_multi_notify_enable.md | 2 +- docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md | 2 +- docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md | 6 +++--- docs/libcurl/symbols-in-versions | 8 ++++---- include/curl/multi.h | 4 ++-- lib/multi.c | 6 +++--- lib/multi_ntfy.c | 6 +++--- src/tool_operate.c | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/libcurl/curl_multi_notify_disable.md b/docs/libcurl/curl_multi_notify_disable.md index f4f28ebbd3..7228bfe89e 100644 --- a/docs/libcurl/curl_multi_notify_disable.md +++ b/docs/libcurl/curl_multi_notify_disable.md @@ -49,7 +49,7 @@ int main(void) int rc; CURLM *multi = curl_multi_init(); - rc = curl_multi_notify_disable(multi, CURLM_NTFY_INFO_READ); + rc = curl_multi_notify_disable(multi, CURLM_NOTIFY_INFO_READ); } ~~~ diff --git a/docs/libcurl/curl_multi_notify_enable.md b/docs/libcurl/curl_multi_notify_enable.md index d3ab02d2c7..095780dd09 100644 --- a/docs/libcurl/curl_multi_notify_enable.md +++ b/docs/libcurl/curl_multi_notify_enable.md @@ -49,7 +49,7 @@ int main(void) int rc; CURLM *multi = curl_multi_init(); - rc = curl_multi_notify_enable(multi, CURLM_NTFY_INFO_READ); + rc = curl_multi_notify_enable(multi, CURLM_NOTIFY_INFO_READ); } ~~~ diff --git a/docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md b/docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md index 3349c77fbe..539e4ce298 100644 --- a/docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md +++ b/docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md @@ -61,7 +61,7 @@ int main(void) /* ... use socket callback and custom pointer */ curl_multi_setopt(multi, CURLMOPT_NOTIFYFUNCTION, ntfy_cb); curl_multi_setopt(multi, CURLMOPT_NOTIFYDATA, &setup); - curl_multi_notify_enable(multi, CURLM_NTFY_INFO_READ); + curl_multi_notify_enable(multi, CURLM_NOTIFY_INFO_READ); } ~~~ diff --git a/docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md b/docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md index 979fea89a7..8e52065217 100644 --- a/docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md +++ b/docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md @@ -63,7 +63,7 @@ are shut down. **notification** is the type of notification, e.g. what happened. The following types are available: -## CURLM_NTFY_INFO_READ +## CURLM_NOTIFY_INFO_READ When enabled via curl_multi_notify_enable(3), this informs the application that there are new messages to be processed via curl_multi_info_read(3). @@ -76,7 +76,7 @@ again. The *easy* handle passed is an internal handle. -## CURLM_NTFY_EASY_DONE +## CURLM_NOTIFY_EASY_DONE When enabled via curl_multi_notify_enable(3), this notification is triggered when a an easy handle has finished. This happens both for @@ -118,7 +118,7 @@ int main(void) /* ... use socket callback and custom pointer */ curl_multi_setopt(multi, CURLMOPT_NOTIFYFUNCTION, ntfy_cb); curl_multi_setopt(multi, CURLMOPT_NOTIFYDATA, &setup); - curl_multi_notify_enable(multi, CURLM_NTFY_INFO_READ); + curl_multi_notify_enable(multi, CURLM_NOTIFY_INFO_READ); } ~~~ diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 75db554e2a..c9b0d24e37 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -545,8 +545,8 @@ CURLM_BAD_SOCKET 7.15.4 CURLM_CALL_MULTI_PERFORM 7.9.6 CURLM_CALL_MULTI_SOCKET 7.15.5 CURLM_INTERNAL_ERROR 7.9.6 -CURLM_NTFY_EASY_DONE 8.17.0 -CURLM_NTFY_INFO_READ 8.17.0 +CURLM_NOTIFY_EASY_DONE 8.17.0 +CURLM_NOTIFY_INFO_READ 8.17.0 CURLM_OK 7.9.6 CURLM_OUT_OF_MEMORY 7.9.6 CURLM_RECURSIVE_API_CALL 7.59.0 @@ -570,8 +570,8 @@ CURLMOPT_MAX_PIPELINE_LENGTH 7.30.0 CURLMOPT_MAX_TOTAL_CONNECTIONS 7.30.0 CURLMOPT_MAXCONNECTS 7.16.3 CURLMOPT_NETWORK_CHANGED 8.16.0 -CURLMOPT_NOTIFYDATA 8.17.0 -CURLMOPT_NOTIFYFUNCTION 8.17.0 +CURLMOPT_NOTIFYDATA 8.17.0 +CURLMOPT_NOTIFYFUNCTION 8.17.0 CURLMOPT_PIPELINING 7.16.0 CURLMOPT_PIPELINING_SERVER_BL 7.30.0 CURLMOPT_PIPELINING_SITE_BL 7.30.0 diff --git a/include/curl/multi.h b/include/curl/multi.h index c486a3a5cc..38c44e3b5a 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -529,8 +529,8 @@ CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *multi, /* * Notifications dispatched by a multi handle, when enabled. */ -#define CURLM_NTFY_INFO_READ 0 -#define CURLM_NTFY_EASY_DONE 1 +#define CURLM_NOTIFY_INFO_READ 0 +#define CURLM_NOTIFY_EASY_DONE 1 /* * Callback to install via CURLMOPT_NOTIFYFUNCTION. diff --git a/lib/multi.c b/lib/multi.c index 58e384b68a..168d584cfb 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -173,13 +173,13 @@ static void mstate(struct Curl_easy *data, CURLMstate state data->mstate = state; switch(state) { case MSTATE_DONE: - CURLM_NTFY(data, CURLM_NTFY_EASY_DONE); + CURLM_NTFY(data, CURLM_NOTIFY_EASY_DONE); break; case MSTATE_COMPLETED: /* we sometimes directly jump to COMPLETED, trigger also a notification * in that case. */ if(oldstate < MSTATE_DONE) - CURLM_NTFY(data, CURLM_NTFY_EASY_DONE); + CURLM_NTFY(data, CURLM_NOTIFY_EASY_DONE); /* changing to COMPLETED means it is in process and needs to go */ DEBUGASSERT(Curl_uint_bset_contains(&data->multi->process, data->mid)); Curl_uint_bset_remove(&data->multi->process, data->mid); @@ -226,7 +226,7 @@ static void ph_freeentry(void *p) static void multi_addmsg(struct Curl_multi *multi, struct Curl_message *msg) { if(!Curl_llist_count(&multi->msglist)) - CURLM_NTFY(multi->admin, CURLM_NTFY_INFO_READ); + CURLM_NTFY(multi->admin, CURLM_NOTIFY_INFO_READ); Curl_llist_append(&multi->msglist, msg, &msg->list); } diff --git a/lib/multi_ntfy.c b/lib/multi_ntfy.c index 95ce82f57d..24a09176f2 100644 --- a/lib/multi_ntfy.c +++ b/lib/multi_ntfy.c @@ -137,7 +137,7 @@ void Curl_mntfy_init(struct Curl_multi *multi) CURLMcode Curl_mntfy_resize(struct Curl_multi *multi) { - if(Curl_uint_bset_resize(&multi->ntfy.enabled, CURLM_NTFY_EASY_DONE + 1)) + if(Curl_uint_bset_resize(&multi->ntfy.enabled, CURLM_NOTIFY_EASY_DONE + 1)) return CURLM_OUT_OF_MEMORY; return CURLM_OK; } @@ -155,7 +155,7 @@ void Curl_mntfy_cleanup(struct Curl_multi *multi) CURLMcode Curl_mntfy_enable(struct Curl_multi *multi, unsigned int type) { - if(type > CURLM_NTFY_EASY_DONE) + if(type > CURLM_NOTIFY_EASY_DONE) return CURLM_UNKNOWN_OPTION; Curl_uint_bset_add(&multi->ntfy.enabled, type); return CURLM_OK; @@ -163,7 +163,7 @@ CURLMcode Curl_mntfy_enable(struct Curl_multi *multi, unsigned int type) CURLMcode Curl_mntfy_disable(struct Curl_multi *multi, unsigned int type) { - if(type > CURLM_NTFY_EASY_DONE) + if(type > CURLM_NOTIFY_EASY_DONE) return CURLM_UNKNOWN_OPTION; Curl_uint_bset_remove(&multi->ntfy.enabled, type); return CURLM_OK; diff --git a/src/tool_operate.c b/src/tool_operate.c index fc5a965625..3ee64c3b84 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1736,7 +1736,7 @@ static void mnotify(CURLM *multi, unsigned int notification, (void)easy; switch(notification) { - case CURLM_NTFY_INFO_READ: + case CURLM_NOTIFY_INFO_READ: result = check_finished(s); /* remember first failure */ if(result && !s->result) @@ -1766,7 +1766,7 @@ static CURLcode parallel_transfers(CURLSH *share) (void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYFUNCTION, mnotify); (void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYDATA, s); - (void)curl_multi_notify_enable(s->multi, CURLM_NTFY_INFO_READ); + (void)curl_multi_notify_enable(s->multi, CURLM_NOTIFY_INFO_READ); result = add_parallel_transfers(s->multi, s->share, &s->more_transfers, &s->added_transfers); -- 2.47.3