From: Clément Bénier <clement.benier@iot.bzh>
Date: Wed, 21 Nov 2018 17:31:51 +0000 (+0100)
Subject: onappid: retrieves the 'appid' with id field
X-Git-Tag: 6.99.1^0
X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F18149%2F1;p=src%2Fapp-framework-main.git

onappid: retrieves the 'appid' with id field

the value of id field shoud be a string not an integer
so {si} is replaced by {ss}

Change-Id: Ief8a1e56295085cfe818301fd0073399a3ae6315
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
---

diff --git a/src/afm-binding.c b/src/afm-binding.c
index 037c108..f4bba8a 100644
--- a/src/afm-binding.c
+++ b/src/afm-binding.c
@@ -244,7 +244,7 @@ static int onappid(afb_req_t req, const char *method, const char **appid)
 
 	/* get the appid if any */
 	if (!wrap_json_unpack(json, "s", appid)
-	 || !wrap_json_unpack(json, "{si}", _id_, appid)) {
+	 || !wrap_json_unpack(json, "{ss}", _id_, appid)) {
 		/* found */
 		INFO("method %s called for %s", method, *appid);
 		return 1;