From 1a39a0eb232ce4aa8bd96c037ab3fb77bbc74a41 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Mon, 16 Oct 2023 16:51:21 +0900 Subject: [PATCH] Remove the logic that checks channel lock during __send_result() Client channel can be invalid when calling __send_result() into the main thread. This patch removes the use of invalid mutex in these cases. Change-Id: I1635f78431187314003bb8f2e53804d7f9231dd1 Signed-off-by: Changgyu Choi --- src/aul_launch.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/aul_launch.c b/src/aul_launch.c index 675b964..b4a555c 100644 --- a/src/aul_launch.c +++ b/src/aul_launch.c @@ -401,19 +401,13 @@ static struct aul_request_s *__create_request(int cmd, int clifd, bundle *b) static int __send_result(struct aul_request_s *req, int res) { - client_channel_t *channel; int ret; if (req->cmd != WIDGET_GET_CONTENT && req->clifd >= 0) { - channel = __find_client_channel(req->clifd); - if (!channel) { + if (__find_client_channel(req->clifd) == NULL) _E("Failed to find client channel. fd(%d)", req->clifd); - return -1; - } - g_rec_mutex_lock(&channel->mutex); ret = aul_sock_send_result_v2(req->clifd, res, false); - g_rec_mutex_unlock(&channel->mutex); if (ret < 0) { _E("Failed to send result. cmd(%s:%d)", aul_cmd_convert_to_string(req->cmd), -- 2.7.4