afb-export: Ensure monitoring of events
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 13 Nov 2017 14:07:04 +0000 (15:07 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 13 Nov 2017 14:07:04 +0000 (15:07 +0100)
Change-Id: Id82c624f695a229023447c16652bcc912b6d6fed
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-evt.h
src/afb-export.c

index 2d888fa..901bfbb 100644 (file)
@@ -18,6 +18,7 @@
 #pragma once
 
 struct afb_event;
+struct afb_eventid;
 struct afb_evtid;
 struct afb_session;
 struct json_object;
index 3a898bb..304395a 100644 (file)
@@ -179,7 +179,7 @@ static struct afb_eventid *eventid_make_cb(void *closure, const char *name)
 static struct afb_event event_make_cb(void *closure, const char *name)
 {
        struct afb_eventid *eventid = eventid_make_cb(closure, name);
-       return (struct afb_event){ .itf = eventid ? eventid->itf : NULL, .closure = eventid };
+       return afb_evt_event_from_evtid(afb_evt_eventid_to_evtid(eventid));
 }
 
 static int event_broadcast_cb(void *closure, const char *name, struct json_object *object)