From: Hwankyu Jhun Date: Wed, 2 Jun 2021 23:54:38 +0000 (+0900) Subject: Fix wrong implementation X-Git-Tag: submit/tizen/20210610.075735~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36877070e4f80d61b039b06a251797230224403f;p=platform%2Fcore%2Fappfw%2Faul-1.git Fix wrong implementation If the return value of aul_sock_recv_reply_pkt() is a negative error value, the function should return the error value after calling aul_error_convert() with the return value. Previous implemenation uses the fd variable. It's a wrong implementation. This patch uses the ret variable when calling aul_error_convert(). Change-Id: Ic054b9d697f9f6502608af88a4ebeed3ae69f138 Signed-off-by: Hwankyu Jhun --- diff --git a/src/pkginfo.c b/src/pkginfo.c index d779820..54e3f73 100644 --- a/src/pkginfo.c +++ b/src/pkginfo.c @@ -770,7 +770,7 @@ API int aul_get_default_app(bundle *b, char **appid) ret = aul_sock_recv_reply_pkt(fd, &pkt); if (ret < 0 || pkt == NULL) { _E("Failed to get reply. error(%d)", ret); - return aul_error_convert(fd); + return aul_error_convert(ret); } if (pkt->cmd != APP_GET_INFO_OK) {