]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Add ->clear_field() passthrough event op
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Wed, 27 Nov 2019 20:49:52 +0000 (15:49 -0500)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 29 Nov 2019 12:07:42 +0000 (14:07 +0200)
src/lib/lib-event.c
src/lib/lib-event.h

index 8d247cd99b76f3be1ee1a774b6947d44e01e1257..35ad9d20810609994758f3c00d601accf8464da5 100644 (file)
@@ -1288,6 +1288,13 @@ event_passthrough_inc_int(const char *key, intmax_t num)
        return event_last_passthrough;
 }
 
+static struct event_passthrough *
+event_passthrough_clear_field(const char *key)
+{
+       event_field_clear(last_passthrough_event(), key);
+       return event_last_passthrough;
+}
+
 static struct event *event_passthrough_event(void)
 {
        struct event *event = last_passthrough_event();
@@ -1308,6 +1315,7 @@ const struct event_passthrough event_passthrough_vfuncs = {
        event_passthrough_add_int,
        event_passthrough_add_timeval,
        event_passthrough_inc_int,
+       event_passthrough_clear_field,
        event_passthrough_event,
 };
 
index 1c24ed3791e5c27cec6f25f2756f15399e3769c3..66f7c9881e7359dd0cce6ab66f9e359ed58d01e3 100644 (file)
@@ -82,6 +82,9 @@ struct event_passthrough {
        struct event_passthrough *
                (*inc_int)(const char *key, intmax_t num);
 
+       struct event_passthrough *
+               (*clear_field)(const char *key);
+
        struct event *(*event)(void);
 };