From: hj kim Date: Wed, 13 May 2020 09:18:26 +0000 (+0900) Subject: Fix to return ERROR_NONE and NULL for value when metadata doesn't exist X-Git-Tag: accepted/tizen/unified/20200514.050650~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e466ae7e378c71453301b8df9df851d6c8270ef6;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Fix to return ERROR_NONE and NULL for value when metadata doesn't exist description for mc_client_get_server_metadata() "If there is no metadata, return value of the @a metadata is NULL." Change-Id: I81363d998becd47e7a9c3affc06108f81445405b --- diff --git a/include/media_controller_client.h b/include/media_controller_client.h index 4bd5432..ab7da14 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 metadata is NULL. + * If there is no metadata, return value of the @a 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/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec index 5bd9f9a..4d2ab8b 100644 --- a/packaging/capi-media-controller.spec +++ b/packaging/capi-media-controller.spec @@ -1,6 +1,6 @@ Name: capi-media-controller Summary: A media controller library in Tizen Native API -Version: 0.2.13 +Version: 0.2.14 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_controller_db.c b/src/media_controller_db.c index c0e2027..d1f26e5 100644 --- a/src/media_controller_db.c +++ b/src/media_controller_db.c @@ -293,7 +293,8 @@ 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 != MEDIA_CONTROLLER_ERROR_NONE && ret != TIZEN_ERROR_NO_DATA, ret, "__mc_db_get_record failed [%d]", ret); + 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); ret = __mc_db_get_metadata(stmt, 0, metadata); SQLITE3_FINALIZE(stmt);