From f1b901ed676b2d45ec8e6ae3d6ef2f94d79f9ee6 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 10 May 2016 13:47:58 +0200 Subject: Refactoring requests and context handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also adds a first (untested) implmentation of the afb services over dbus. Change-Id: Id1bdeccf75f3a70d3658bdaf0510d6e7b97f6c32 Signed-off-by: José Bollo --- plugins/afm-main-plugin/afm-main-plugin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c index c6408a51..8b26fe7e 100644 --- a/plugins/afm-main-plugin/afm-main-plugin.c +++ b/plugins/afm-main-plugin/afm-main-plugin.c @@ -62,6 +62,7 @@ static struct memo *make_memo(struct afb_req request, const char *method) if (memo != NULL) { memo->request = request; memo->method = method; + afb_req_addref(request); } return memo; } @@ -109,6 +110,7 @@ static void embed_call_void_callback(int status, struct json_object *obj, struct afb_req_success(memo->request, obj, NULL); } } + afb_req_unref(memo->request); free(memo); } @@ -134,6 +136,7 @@ static void call_appid_callback(int status, struct json_object *obj, struct memo obj = json_object_get(obj); afb_req_success(memo->request, obj, NULL); } + afb_req_unref(memo->request); free(memo); } -- cgit 1.2.3-korg