From: Hwankyu Jhun Date: Thu, 15 Aug 2019 12:52:30 +0000 (+0900) Subject: Check the result of the packet X-Git-Tag: accepted/tizen/unified/20190819.081601~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32fb290e423308e95d1c6974aa3c2805aaf008c7;p=platform%2Fcore%2Fappfw%2Faul-1.git Check the result of the packet If the request is failed, the cmd of the packet is a negative error value. Change-Id: If5ef6e9c16719063cc89a5b0d5ab9bc8222d3b42 Signed-off-by: Hwankyu Jhun --- diff --git a/src/aul_comp_context.c b/src/aul_comp_context.c index ed86ac0..860cb52 100644 --- a/src/aul_comp_context.c +++ b/src/aul_comp_context.c @@ -366,6 +366,13 @@ API int aul_comp_context_usr_create(const char *comp_id, uid_t uid, return aul_error_convert(ret); } + if (pkt->cmd != APP_GET_INFO_OK) { + _E("Failed to get component info. error(%d)", pkt->cmd); + ret = pkt->cmd; + free(pkt); + return ret; + } + b = NULL; if (pkt->opt & AUL_SOCK_BUNDLE) { b = bundle_decode(pkt->data, pkt->len); diff --git a/src/aul_comp_info.c b/src/aul_comp_info.c index d956c4e..a9fc3de 100644 --- a/src/aul_comp_info.c +++ b/src/aul_comp_info.c @@ -901,6 +901,13 @@ API int aul_comp_info_usr_create(const char *comp_id, uid_t uid, return aul_error_convert(ret); } + if (pkt->cmd != APP_GET_INFO_OK) { + _E("Failed to get component info. error(%d)", pkt->cmd); + ret = pkt->cmd; + free(pkt); + return ret; + } + b = NULL; if (pkt->opt & AUL_SOCK_BUNDLE) { b = bundle_decode(pkt->data, pkt->len);