]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: notify rename, remove the last stragglers
authorStefan Eissing <stefan@eissing.org>
Tue, 7 Oct 2025 11:40:05 +0000 (13:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2025 12:54:49 +0000 (14:54 +0200)
in the public API.

Follow-up to 357808f4addef44c2c48f17d

Closes #18910

docs/libcurl/curl_multi_notify_disable.md
docs/libcurl/curl_multi_notify_enable.md
docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md
docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md
docs/libcurl/symbols-in-versions
include/curl/multi.h
lib/multi.c
lib/multi_ntfy.c
src/tool_operate.c

index f4f28ebbd3bbcd2a5a315b0c683c910fb2f2975d..7228bfe89e5cd9582f0f4e60da6869dfc26c9e42 100644 (file)
@@ -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);
 }
 ~~~
 
index d3ab02d2c756af8921e2bf28a1bb0d76f3888d38..095780dd09096f29ce30cb17f79ac2a60566b8ed 100644 (file)
@@ -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);
 }
 ~~~
 
index 3349c77fbeda4eb2d1b63370fcfd87b8def8758d..539e4ce2989edcc75406942b75eb794cc6ecb620 100644 (file)
@@ -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);
 }
 ~~~
 
index 979fea89a7041331c399e960cce52e9eb5c81d04..8e5206521729fa3548cb1cf342a9ce3d3b907fa3 100644 (file)
@@ -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);
 }
 ~~~
 
index 75db554e2a05f4404a957775d05c593eee4a1fc0..c9b0d24e37bf60c9c659bb6299e2ea3d7f8c8b19 100644 (file)
@@ -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
index c486a3a5cc40b483b83297b485a6065645ba5254..38c44e3b5aff700124e36039ca398d0286ee2361 100644 (file)
@@ -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.
index 58e384b68ae92c77c9f3266328f20227a033ddbb..168d584cfb8f3da4adb1133f6717749d9bb6d40f 100644 (file)
@@ -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);
 }
 
index 95ce82f57dbc6502f86052ab4b74a7ebf93e2aa8..24a09176f24181bb26ccfba107f04be6a1e0ad96 100644 (file)
@@ -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;
index fc5a9656252f2c296b2c750ea1c782e7a8074987..3ee64c3b844f61c76b79438d64721a2bb2b26741 100644 (file)
@@ -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);