From 27d487e9fa8ac3033bcdae34dacdf615a0b8ee57 Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Thu, 14 May 2020 10:09:31 +0000 Subject: [PATCH] Revert "Fix to return ERROR_NONE and NULL for value when metadata doesn't exist" This reverts commit 547866cf02c13ce2e436513dd6fdb62e31fb0e0a. Change-Id: I2dc463bcd1442740e4735b9f208a5ac66a0ba0bb --- include/media_controller_client.h | 2 +- src/media_controller_db.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/media_controller_client.h b/include/media_controller_client.h index ab7da14..4bd5432 100644 --- a/include/media_controller_client.h +++ b/include/media_controller_client.h @@ -1643,7 +1643,7 @@ int mc_client_get_server_playback_info(mc_client_h client, const char *server_na * @privilege %http://tizen.org/privilege/mediacontroller.client * * @remarks The @a metadata should be released using @c mc_metadata_destroy(). \n - * If there is no metadata, return value of the @a metadata is NULL. + * If there is no metadata, return value of the metadata is NULL. * * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server diff --git a/src/media_controller_db.c b/src/media_controller_db.c index 53f99a7..4b5605e 100644 --- a/src/media_controller_db.c +++ b/src/media_controller_db.c @@ -301,8 +301,7 @@ int _mc_db_get_metadata_info(sqlite3 *handle, const char *server_name, mc_metada sql_str = sqlite3_mprintf("SELECT %s FROM %q WHERE name=%Q", META_LIST, MC_DB_TABLE_LATEST_META, server_name); ret = __mc_db_get_record(handle, sql_str, &stmt); - mc_retvm_if(ret == TIZEN_ERROR_NO_DATA, MEDIA_CONTROLLER_ERROR_NONE, "no metadata info"); - mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "__mc_db_get_record failed [%d]", ret); + mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE && ret != TIZEN_ERROR_NO_DATA, ret, "__mc_db_get_record failed [%d]", ret); ret = __mc_db_get_metadata(stmt, 0, metadata); SQLITE3_FINALIZE(stmt); -- 2.7.4