]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Remove support for unregistering categories
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Fri, 8 Nov 2019 17:58:47 +0000 (12:58 -0500)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 22 Nov 2019 10:44:16 +0000 (12:44 +0200)
Nothing used the code and there were some unhandled corner cases.

src/lib/lib-event.c
src/lib/lib-event.h

index 55af8176aefe2330210eca76402f621ea321d46f..218def6cdc426ba8a96415bd64e05bbb93908754 100644 (file)
@@ -1098,37 +1098,6 @@ void event_category_unregister_callback(event_category_callback_t *callback)
        i_unreached();
 }
 
-static void event_category_remove_from_array(struct event_category *category)
-{
-       struct event_category *const *catp;
-
-       array_foreach(&event_registered_categories, catp) {
-               if (*catp == category) {
-                       array_delete(&event_registered_categories,
-                               array_foreach_idx(&event_registered_categories, catp), 1);
-                       return;
-               }
-       }
-       i_unreached();
-}
-
-void event_category_unregister(struct event_category *category)
-{
-       event_category_callback_t *const *callbackp;
-
-       if (!category->registered) {
-               /* it was never registered in the first place - ignore */
-               return;
-       }
-
-       category->registered = FALSE;
-       event_category_remove_from_array(category);
-
-       array_foreach(&event_category_callbacks, callbackp) T_BEGIN {
-               (*callbackp)(category);
-       } T_END;
-}
-
 static struct event_passthrough *
 event_passthrough_set_append_log_prefix(const char *prefix)
 {
index 10445f133460b60ff3ee3ccaf550e7080f653bc5..6bb86d0e4f91adea37eaf4231e08ecab795f2260 100644 (file)
@@ -310,11 +310,6 @@ bool event_import_unescaped(struct event *event, const char *const *args,
    need to be called. */
 void event_send_abort(struct event *event);
 
-/* Explicitly register an event category. It must not be in use by any events
-   at this point. This is normally necessary only when unloading an plugin
-   that has registered an event category. */
-void event_category_unregister(struct event_category *category);
-
 void lib_event_init(void);
 void lib_event_deinit(void);