aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-evt.c9
-rw-r--r--src/afb-evt.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/afb-evt.c b/src/afb-evt.c
index 18f4bca6..9937c1a6 100644
--- a/src/afb-evt.c
+++ b/src/afb-evt.c
@@ -738,3 +738,12 @@ void afb_evt_eventid_unref(struct afb_eventid *eventid)
if (evtid)
afb_evt_evtid_unref(evtid);
}
+
+struct afb_eventid *afb_evt_eventid_addref(struct afb_eventid *eventid)
+{
+ struct afb_evtid *evtid = afb_evt_eventid_to_evtid(eventid);
+ if (evtid)
+ afb_evt_evtid_addref(evtid);
+ return eventid;
+}
+
diff --git a/src/afb-evt.h b/src/afb-evt.h
index a6bfda1e..2d888fa1 100644
--- a/src/afb-evt.h
+++ b/src/afb-evt.h
@@ -67,6 +67,7 @@ extern void afb_evt_update_hooks();
extern struct afb_eventid *afb_evt_eventid_create(const char *fullname);
extern const char *afb_evt_eventid_fullname(struct afb_eventid *eventid);
extern int afb_evt_eventid_id(struct afb_eventid *eventid);
+extern struct afb_eventid *afb_evt_eventid_addref(struct afb_eventid *eventid);
extern void afb_evt_eventid_unref(struct afb_eventid *eventid);
extern int afb_evt_eventid_push(struct afb_eventid *eventid, struct json_object *object);