From 36877070e4f80d61b039b06a251797230224403f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 3 Jun 2021 08:54:38 +0900 Subject: [PATCH] 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 --- src/pkginfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.7.4