summaryrefslogtreecommitdiffstats
path: root/binding/navigation-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/navigation-api.c')
-rw-r--r--binding/navigation-api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binding/navigation-api.c b/binding/navigation-api.c
index 1774e29..07e5216 100644
--- a/binding/navigation-api.c
+++ b/binding/navigation-api.c
@@ -80,7 +80,7 @@ static void navigation_subscribe_unsubscribe(afb_req_t request,
gboolean unsub)
{
struct navigation_state *ns = navigation_get_userdata();
- json_object *jresp = json_object_new_object();
+ json_object *jresp = NULL;
const char *value;
afb_event_t event;
int rc;
@@ -121,6 +121,7 @@ static void navigation_subscribe_unsubscribe(afb_req_t request,
return;
}
+ jresp = json_object_new_object();
afb_req_success_f(request, jresp, "Navigation %s to event \"%s\"",
!unsub ? "subscribed" : "unsubscribed",
value);