Remove unused variable 07/240907/2
authorMinje Ahn <minje.ahn@samsung.com>
Wed, 12 Aug 2020 22:53:34 +0000 (07:53 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Wed, 12 Aug 2020 22:55:40 +0000 (07:55 +0900)
Change-Id: I9e1c3ee74c7591cab666410300c98ffa5d92f568
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/scanner-v2/media-scanner-scan-v2.c

index 1be792a..472b8aa 100644 (file)
@@ -1048,7 +1048,6 @@ gpointer msc_storage_scan_thread(gpointer data)
        sqlite3 *handle = NULL;
        ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
        int scan_type;
-       char *update_path = NULL;
        uid_t uid = MEDIA_DEFAULT_UID;
 
        while (1) {
@@ -1073,7 +1072,6 @@ gpointer msc_storage_scan_thread(gpointer data)
 
                uid = scan_data->uid;
 
-               /*connect to media db, if connecting is failed, db updating is stopped*/
                ret = ms_connect_db(&handle, uid);
                if (ret != MS_MEDIA_ERR_NONE) {
                        MS_DBG_ERR("ms_connect_db failed");
@@ -1086,8 +1084,6 @@ gpointer msc_storage_scan_thread(gpointer data)
                        goto NEXT;
                }
 
-               update_path = g_strdup(scan_data->msg);
-
                ret = __msc_check_memory_status(uid);
                if (ret != MS_MEDIA_ERR_NONE) {
                        ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_STOP, uid);
@@ -1098,40 +1094,31 @@ gpointer msc_storage_scan_thread(gpointer data)
 
                ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_PROCESSING, uid);
 
-               /*start db updating */
                ms_set_db_status(MS_DB_UPDATING, storage_type);
 
                if (scan_type != MS_MSG_STORAGE_INVALID)
                        ms_batch_commit_enable(false, 0);
 
                if (scan_type == MS_MSG_STORAGE_ALL) {
-                       /* Delete all data before full scanning */
                        if (ms_delete_invalid_items(handle, scan_data->storage_id, uid) != MS_MEDIA_ERR_NONE)
                                MS_DBG_ERR("ms_delete_invalid_items fails");
                }
 
                ret = __msc_db_update(handle, scan_data->storage_id, scan_data);
 
-               /*call for bundle commit*/
                if (scan_type != MS_MSG_STORAGE_INVALID)
                        ms_batch_commit_disable(uid);
 
                if (scan_type == MS_MSG_STORAGE_PARTIAL && ret == MS_MEDIA_ERR_NONE) {
-                       /*delete invalid folder first, then delete invalid item, avoid to folder was deleted but item not when unmount*/
                        ms_delete_invalid_folder(scan_data->storage_id, uid);
                        ms_delete_invalid_items(handle, scan_data->storage_id, uid);
                }
 
-               /* send notification */
-               /*ms_send_dir_update_noti(update_path, NULL, MS_ITEM_UPDATE, scan_data->pid);*/
-
                if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
                        ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_STOP, uid);
-                       /*set vconf key mmc loading for indicator */
                        ms_set_db_status(MS_DB_STOPPED, storage_type);
                } else {
                        ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_COMPLETE, uid);
-                       /*set vconf key mmc loading for indicator */
                        ms_set_db_status(MS_DB_UPDATED, storage_type);
                }
 
@@ -1141,16 +1128,11 @@ gpointer msc_storage_scan_thread(gpointer data)
 NEXT:
                __msc_del_blocked_path();
 
-               g_free(update_path);
-               update_path = NULL;
-
                if (_msc_is_power_off())
                        goto _POWEROFF;
 
-               /*disconnect from media db*/
                ms_disconnect_db(handle);
 
-               /*Active flush */
                malloc_trim(0);
 
                scan_data->msg_type = MS_MSG_SCANNER_COMPLETE;
@@ -1162,7 +1144,7 @@ NEXT:
                MS_DBG_WARN("STORAGE SCAN END[%d]", ret);
 
                usleep(SCAN_SLEEP_TIME);
-       }                       /*thread while*/
+       }
 
 _POWEROFF:
        g_free(scan_data);