]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: lib-event - Add inc_int to passthrough events
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 17 Aug 2018 07:39:05 +0000 (10:39 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 24 Aug 2018 06:55:18 +0000 (06:55 +0000)
Was forgotten in 12927b843387b2a93fcf1d2e05df7c79af06e567

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

index 324d71234f2fff0a12329d2cebd9d565958841ac..01fc777cebcbe8085cf4d79145227682f6467671 100644 (file)
@@ -889,6 +889,13 @@ event_passthrough_add_timeval(const char *key, const struct timeval *tv)
        return event_last_passthrough;
 }
 
+static struct event_passthrough *
+event_passthrough_inc_int(const char *key, intmax_t num)
+{
+       event_inc_int(last_passthrough_event(), key, num);
+       return event_last_passthrough;
+}
+
 static struct event *event_passthrough_event(void)
 {
        struct event *event = last_passthrough_event();
@@ -908,6 +915,7 @@ const struct event_passthrough event_passthrough_vfuncs = {
        event_passthrough_add_str,
        event_passthrough_add_int,
        event_passthrough_add_timeval,
+       event_passthrough_inc_int,
        event_passthrough_event,
 };
 
index e39f6c82884100db61772f5f25caa4240865e098..e1e7974aa6c1ac7ca03ced53d70abd1b9f75c3e3 100644 (file)
@@ -70,6 +70,10 @@ struct event_passthrough {
                (*add_int)(const char *key, intmax_t num);
        struct event_passthrough *
                (*add_timeval)(const char *key, const struct timeval *tv);
+
+       struct event_passthrough *
+               (*inc_int)(const char *key, intmax_t num);
+
        struct event *(*event)(void);
 };