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),