From 225544e63a85611212d3aabc117bb5fecb5dc8d2 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 16 Jan 2024 11:17:04 +0900 Subject: [PATCH] Fix wrong error handling If aul library does not find the client channel, the request must be ignored. Change-Id: If45da924ad3479d1c02a51c7c48cbd68d689093d Signed-off-by: Hwankyu Jhun --- src/aul_launch.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/aul_launch.c b/src/aul_launch.c index 6d1082c..da4bcd3 100644 --- a/src/aul_launch.c +++ b/src/aul_launch.c @@ -402,8 +402,13 @@ static int __send_result(struct aul_request_s *req, int res) if (req->cmd != WIDGET_GET_CONTENT && req->clifd >= 0) { g_rec_mutex_lock(&__context.mutex); - if (__find_client_channel(req->clifd) == NULL) - _E("Failed to find client channel. fd(%d)", req->clifd); + if (__find_client_channel(req->clifd) == NULL) { + _E("Failed to find client channel. fd(%d), cmd(%s:%d)", + req->clifd, + aul_cmd_convert_to_string(req->cmd), + req->cmd); + return -1; + } buf[0] = req->req_id; buf[1] = res; -- 2.7.4