Fix svace warning 97/68197/1 accepted/tizen/common/20160504.125851 accepted/tizen/ivi/20160504.011134 accepted/tizen/mobile/20160504.011041 accepted/tizen/tv/20160504.011059 accepted/tizen/wearable/20160504.011115 submit/tizen/20160503.074218
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 3 May 2016 02:53:08 +0000 (11:53 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 3 May 2016 02:53:08 +0000 (11:53 +0900)
Change-Id: Iece4f2640e813c5683e8067973d374bef16c4fe8
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/server/media-server-dcm.c
src/server/media-server-device-block.c

index 3cf7e8b..2af85cf 100644 (file)
@@ -447,8 +447,6 @@ gboolean _ms_dcm_request_to_server(gpointer data)
        dcmRequest *req = NULL;
        req = (dcmRequest *)g_queue_pop_head(g_dcm_request_queue);
 
-       MS_DBG("Pop request %d %p", req->recv_msg->msg_type);
-
        if (req == NULL) {
                MS_DBG_ERR("Failed to get a request job from queue");
                return TRUE;
index 3e87920..0782595 100755 (executable)
@@ -66,7 +66,6 @@ int ms_usb_insert_handler(const char *mount_path, const char *mount_uuid)
        uid_t uid;
        ms_dir_scan_type_t scan_type = MS_SCAN_ALL;
 
-       uuid = strndup(mount_uuid, strlen(mount_uuid));
        ret = ms_load_functions();
        if (ret != MS_MEDIA_ERR_NONE) {
                MS_DBG_ERR("ms_load_functions failed [%d]", ret);
@@ -77,6 +76,7 @@ int ms_usb_insert_handler(const char *mount_path, const char *mount_uuid)
        ms_connect_db(&handle, uid);
 
        if (mount_path != NULL && mount_uuid != NULL) {
+               uuid = strndup(mount_uuid, strlen(mount_uuid));
                /*CHECK DB HERE */
                ret = ms_check_db_upgrade(handle, uid);
                if (ret != MS_MEDIA_ERR_NONE) {
@@ -99,6 +99,7 @@ int ms_usb_insert_handler(const char *mount_path, const char *mount_uuid)
                        }
                        scan_type = MS_SCAN_PART;
                        ms_set_storage_validity(handle, mount_uuid, 1, uid);
+
                        if (ms_set_storage_scan_status(handle, uuid, MEDIA_SCAN_PREPARE, uid) != MS_MEDIA_ERR_NONE) {
                                MS_DBG_ERR("ms_set_storage_scan_status failed");
                        }