Skip to content

Commit

Permalink
lib: lib-event - Add inc_int to passthrough events
Browse files Browse the repository at this point in the history
Was forgotten in 12927b8
  • Loading branch information
cmouse authored and villesavolainen committed Nov 13, 2018
1 parent 2b2cf4b commit e884540
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/lib-event.c
Expand Up @@ -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();
Expand All @@ -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,
};

Expand Down
4 changes: 4 additions & 0 deletions src/lib/lib-event.h
Expand Up @@ -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);
};

Expand Down

0 comments on commit e884540

Please sign in to comment.