summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
Diffstat (limited to 'binding')
-rw-r--r--binding/navigation-api.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/binding/navigation-api.c b/binding/navigation-api.c
index d9ea285..19913a1 100644
--- a/binding/navigation-api.c
+++ b/binding/navigation-api.c
@@ -146,12 +146,22 @@ static void broadcast(afb_req_t request, const char *name, gboolean cache)
json_object_get(jresp);
*storage = jresp;
+ // increment reference for event
+ json_object_get(jresp);
+ afb_event_push(event, jresp);
+
g_rw_lock_writer_unlock(&ns->rw_lock);
+
+ return;
}
+ g_rw_lock_reader_lock(&ns->rw_lock);
+
// increment reference for event
json_object_get(jresp);
afb_event_push(event, jresp);
+
+ g_rw_lock_reader_unlock(&ns->rw_lock);
}
static void broadcast_status(afb_req_t request)