From: Hwankyu Jhun Date: Mon, 15 Mar 2021 09:27:47 +0000 (+0900) Subject: Fix exception handling of SendAndReceive() method X-Git-Tag: accepted/tizen/unified/20210318.055935~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33e95e4a2312a56fc1d1bafec1bc174cb16afa69;p=platform%2Fcore%2Fappfw%2Faul-1.git Fix exception handling of SendAndReceive() method Change-Id: I5db0c5fbd04c9187375d7f008f30396427d4d4f1 Signed-off-by: Hwankyu Jhun --- diff --git a/src/aul_svc.cc b/src/aul_svc.cc index 6ec38e3..0ad74b1 100644 --- a/src/aul_svc.cc +++ b/src/aul_svc.cc @@ -280,8 +280,12 @@ int SendAndReceive(int cmd, uid_t uid, bundle* request, bundle** response) { } auto ptr = std::unique_ptr(pkt, std::free); - if (pkt->cmd != APP_GET_INFO_OK && pkt->cmd != cmd) - return AUL_SVC_RET_ERROR; + if (pkt->cmd != APP_GET_INFO_OK && pkt->cmd != cmd) { + if (pkt->cmd == APP_GET_INFO_ERROR) + return AUL_SVC_RET_ERROR; + + return AulErrorConvert(aul_error_convert(pkt->cmd)); + } bundle* b = nullptr; if (pkt->opt & AUL_SOCK_BUNDLE) {