]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Nov 2018 13:09:32 +0000 (15:09 +0200)
Was forgotten in 12927b843387b2a93fcf1d2e05df7c79af06e567

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

index 8f2b65fe42782db6da42a95c3a4ad174d7bc83bc..fe6fdf246cac075f50dfcf5e66f5c260a79a1e48 100644 (file)
@@ -958,6 +958,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();
@@ -977,6 +984,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 c77732750f707233bbbe85a81dc273b25ff22ba7..5b29cba852d3d9f1dea0445807852b0b67032b76 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);
 };