From fb26e63a2b358e4aeb7c4b94628133601445dfa9 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Tue, 27 Jun 2017 13:41:17 +0900 Subject: [PATCH] Update description for precondition Change-Id: Ie307eea3aa796c7087579a14212d76e6f9429365 Signed-off-by: Minje Ahn --- include/media_content.h | 3 +++ include_product/media_content.h | 3 +++ src/media_content.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/media_content.h b/include/media_content.h index 707fa4c..76c52a7 100755 --- a/include/media_content.h +++ b/include/media_content.h @@ -117,6 +117,7 @@ int media_content_disconnect(void); * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy * * @pre This function requires opened connection to content service by media_content_connect(). + * @see media_content_connect() */ int media_content_scan_file(const char *path); @@ -163,7 +164,9 @@ int media_content_scan_file(const char *path); * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy * + * @pre This function requires opened connection to content service by media_content_connect(). * @see media_scan_completed_cb() + * @see media_content_connect() */ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_completed_cb callback, void *user_data); diff --git a/include_product/media_content.h b/include_product/media_content.h index 73c00fc..de4dc07 100755 --- a/include_product/media_content.h +++ b/include_product/media_content.h @@ -118,6 +118,7 @@ int media_content_disconnect(void); * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy * * @pre This function requires opened connection to content service by media_content_connect(). + * @see media_content_connect() */ int media_content_scan_file(const char *path); @@ -164,7 +165,9 @@ int media_content_scan_file(const char *path); * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy * + * @pre This function requires opened connection to content service by media_content_connect(). * @see media_scan_completed_cb() + * @see media_content_connect() */ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_completed_cb callback, void *user_data); diff --git a/src/media_content.c b/src/media_content.c index c2b7f94..73e6ce0 100755 --- a/src/media_content.c +++ b/src/media_content.c @@ -1492,7 +1492,10 @@ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_co cb_data->user_data = user_data; ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, tzplatform_getuid(TZ_USER_NAME)); - /*FIX ME. need to check ret value?*/ + if (ret != MS_MEDIA_ERR_NONE) { + media_content_error("media_svc_get_storage_id failed : %d", ret); + return _content_error_capi(MEDIA_CONTENT_TYPE, ret); + } ret = media_directory_scanning_async(repl_path, storage_id, is_recursive, _media_content_scan_cb, cb_data, tzplatform_getuid(TZ_USER_NAME)); if (ret != MS_MEDIA_ERR_NONE) -- 2.7.4