From: Minje Ahn Date: Thu, 27 Aug 2015 02:01:45 +0000 (+0900) Subject: Fix media db open options X-Git-Tag: accepted/tizen/mobile/20150828.083114^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F46882%2F1;p=platform%2Fcore%2Fmultimedia%2Flibmedia-service.git Fix media db open options Change-Id: Ib187e747a212a2bc3a144449cdf8270c687beae5 Signed-off-by: Minje Ahn --- diff --git a/include/media-svc.h b/include/media-svc.h index c1a4e32..4259caa 100755 --- a/include/media-svc.h +++ b/include/media-svc.h @@ -33,7 +33,7 @@ extern "C" { #endif -int media_svc_connect(MediaSvcHandle **handle, uid_t uid, bool needWrite); +int media_svc_connect(MediaSvcHandle **handle, uid_t uid); int media_svc_disconnect(MediaSvcHandle *handle); int media_svc_create_table(MediaSvcHandle *handle, uid_t uid); int media_svc_check_item_exist_by_path(MediaSvcHandle *handle, const char *path); diff --git a/plugin/media-content-plugin.c b/plugin/media-content-plugin.c index 40480ae..2374a36 100755 --- a/plugin/media-content-plugin.c +++ b/plugin/media-content-plugin.c @@ -91,7 +91,7 @@ static void __set_error_message(int err_type, char **err_msg) int connect_db(void **handle, uid_t uid, char **err_msg) { - int ret = media_svc_connect(handle, uid, true); + int ret = media_svc_connect(handle, uid); if (ret < 0) { __set_error_message(ret, err_msg); diff --git a/src/common/media-svc.c b/src/common/media-svc.c index 9685758..d30880e 100755 --- a/src/common/media-svc.c +++ b/src/common/media-svc.c @@ -50,14 +50,14 @@ static __thread int g_insert_with_noti = FALSE; #define DEFAULT_MEDIA_SVC_STORAGE_ID "media" -int media_svc_connect(MediaSvcHandle **handle, uid_t uid, bool needWrite) +int media_svc_connect(MediaSvcHandle **handle, uid_t uid) { int ret = MS_MEDIA_ERR_NONE; MediaDBHandle *db_handle = NULL; media_svc_debug_func(); - ret = media_db_connect(&db_handle, uid, needWrite); + ret = media_db_connect(&db_handle, uid, FALSE); if (ret != MS_MEDIA_ERR_NONE) return ret; diff --git a/test/media-service-test.c b/test/media-service-test.c index 41447e5..c26d987 100755 --- a/test/media-service-test.c +++ b/test/media-service-test.c @@ -227,7 +227,7 @@ int test_noti() int main() { int ret = MS_MEDIA_ERR_NONE; - ret = media_svc_connect(&g_db_handle, true); + ret = media_svc_connect(&g_db_handle, tzplatform_getuid(TZ_USER_NAME)); if (ret != MS_MEDIA_ERR_NONE) { media_svc_error("media_svc_connect failed : %d", ret); } else {