From 4f5091ffe7daf5b17b97658013c86a8ba0f41681 Mon Sep 17 00:00:00 2001 From: Yong Yeon Kim Date: Tue, 4 Oct 2016 19:02:24 +0900 Subject: [PATCH] fix deadlock issue from previos modification Change-Id: Ie132bd42f1e00d55b2790cd64146b2ea07624109 --- src/media_db.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/media_db.c b/src/media_db.c index 213257c..dfea821 100755 --- a/src/media_db.c +++ b/src/media_db.c @@ -204,9 +204,7 @@ static int __media_db_make_query(filter_h filter, attribute_h attr, char *select { int ret = MEDIA_CONTENT_ERROR_NONE; filter_s *_filter = NULL; -#ifdef _USE_TV_PROFILE - g_mutex_lock(_content_get_db_mutex()); -#endif + if (filter != NULL) { _filter = (filter_s*)filter; @@ -221,22 +219,12 @@ static int __media_db_make_query(filter_h filter, attribute_h attr, char *select SAFE_STRLCAT(bracket_added_condition, QUERY_KEYWORD_BRACKET, MAX_QUERY_SIZE); ret = _media_filter_attribute_generate(attr, bracket_added_condition, _filter->condition_collate_type, condition_query); -#ifdef _USE_TV_PROFILE - if (ret != MEDIA_CONTENT_ERROR_NONE) { - g_mutex_unlock(_content_get_db_mutex()); - return ret; - } -#else media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret); -#endif } ret = _media_filter_attribute_option_generate(attr, filter, option_query); if (ret != MEDIA_CONTENT_ERROR_NONE) { SAFE_FREE(*condition_query); -#ifdef _USE_TV_PROFILE - g_mutex_unlock(_content_get_db_mutex()); -#endif return ret; } @@ -245,9 +233,6 @@ static int __media_db_make_query(filter_h filter, attribute_h attr, char *select SAFE_STRLCAT(select_query, QUERY_KEYWORD_AND, select_query_size); } } -#ifdef _USE_TV_PROFILE - g_mutex_unlock(_content_get_db_mutex()); -#endif return ret; } -- 2.7.4