From ba005257731276ed874c9306ff95c77e0f8293d8 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Wed, 27 Mar 2024 16:44:06 +0900 Subject: [PATCH] Fix BAD_CHECK_OF_WAIT_COND Change-Id: Ic51fa5b8cd1db7f122bb126c1cb4c78e339e9ab7 --- agent/download-agent-http-mgr.c | 3 ++- packaging/download-provider.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/agent/download-agent-http-mgr.c b/agent/download-agent-http-mgr.c index fad7fb8..db4712b 100755 --- a/agent/download-agent-http-mgr.c +++ b/agent/download-agent-http-mgr.c @@ -564,7 +564,8 @@ da_ret_t request_http_download(da_info_t *da_info) send_client_paused_info(da_info); DA_LOGD("Waiting thread for paused state"); DA_MUTEX_LOCK(&(http_info->mutex_http)); - pthread_cond_wait(&(http_info->cond_http), &(http_info->mutex_http)); + while (http_info->state == HTTP_STATE_PAUSED) + pthread_cond_wait(&(http_info->cond_http), &(http_info->mutex_http)); DA_MUTEX_UNLOCK(&(http_info->mutex_http)); DA_LOGD("Wake up thread due to resume"); break; diff --git a/packaging/download-provider.spec b/packaging/download-provider.spec index 1d60abc..a9d30a6 100755 --- a/packaging/download-provider.spec +++ b/packaging/download-provider.spec @@ -1,6 +1,6 @@ Name: download-provider Summary: Download the contents in background -Version: 2.3.13 +Version: 2.3.14 Release: 0 Group: Development/Libraries License: Apache-2.0 -- 2.7.4