Remove unused g_cancel_path 15/149215/2 accepted/tizen/unified/20170913.071145 submit/tizen/20170912.034220
authorHaejeong Kim <backto.kim@samsung.com>
Tue, 12 Sep 2017 02:02:34 +0000 (11:02 +0900)
committerhj kim <backto.kim@samsung.com>
Tue, 12 Sep 2017 02:09:10 +0000 (02:09 +0000)
Change-Id: If916a2b67b6ed223c2a570018df97a9db89d263a

src/scanner-v2/include/media-scanner-scan-v2.h
src/scanner-v2/media-scanner-device-block-v2.c
src/scanner-v2/media-scanner-scan-v2.c
src/scanner/include/media-scanner-scan.h
src/scanner/media-scanner-scan.c

index 7b47f35..d9ae5eb 100755 (executable)
@@ -59,6 +59,5 @@ int msc_push_scan_request(ms_scan_type_e scan_type, ms_comm_msg_s *recv_msg);
 int msc_stop_scan_thread(void);
 int msc_get_remain_scan_request(ms_scan_type_e scan_type, int *remain_request);
 int msc_get_dir_scan_status(bool *scan_status);
-int msc_set_cancel_path(const char *cancel_path);
 
 #endif /*_MEDIA_SCANNER_SCAN_V2_H_*/
index 53f7f53..4dbcff4 100755 (executable)
@@ -57,8 +57,7 @@ static void __msc_usb_remove_event(const char *mount_path)
 
        if (msc_get_dir_scan_status(&status) == MS_MEDIA_ERR_NONE) {
                if (status == TRUE) {
-                       MS_DBG_WARN("Doing directory scanning. Set cancel path");
-                       msc_set_cancel_path(mount_path);
+                       MS_DBG_WARN("Doing directory scanning");
                }
                status = FALSE;
        }
index 43dfc95..6030244 100755 (executable)
@@ -68,7 +68,6 @@ GMutex data_mutex2;   /* Must be initialized somewhere */
 gpointer current_data2 = NULL;
 GMutex scan_item_mutex;
 
-char *g_cancel_path2;
 char *g_blocked_path2;
 
 s_scan_item* cancel_scan_item = NULL;
@@ -2061,15 +2060,3 @@ int msc_get_dir_scan_status(bool *scan_status)
        return MS_MEDIA_ERR_NONE;
 }
 
-int msc_set_cancel_path(const char *cancel_path)
-{
-       if (g_cancel_path2 != NULL) {
-               MS_DBG_WARN("g_cancel_path2 is not NULL");
-               MS_SAFE_FREE(g_cancel_path2);
-       }
-
-       g_cancel_path2 = strdup(cancel_path);
-
-       return MS_MEDIA_ERR_NONE;
-}
-
index fa874c4..24c2b97 100755 (executable)
@@ -36,7 +36,6 @@ gboolean msc_register_thread(void *data);
 gboolean msc_storage_scan_thread(void *data);
 int msc_check_remain_task(void);
 ms_db_status_type_t msc_check_scanning_status(void);
-int msc_set_cancel_path(const char *cancel_path);
 int msc_del_cancel_path(void);
 void msc_metadata_update_thread(ms_comm_msg_s *recv_msg);
 int msc_init_scanner(void);
index 63f2323..5e4b157 100755 (executable)
@@ -43,7 +43,6 @@ GAsyncQueue * storage_queue;
 GAsyncQueue *scan_queue;
 GAsyncQueue *reg_queue;
 GMutex scan_req_mutex;
-char *g_cancel_path;
 
 static int __msc_clear_file_list(GArray *path_array);
 
@@ -735,18 +734,6 @@ _POWEROFF:
        return false;
 }
 
-int msc_set_cancel_path(const char *cancel_path)
-{
-       if (g_cancel_path != NULL) {
-               MS_DBG_WARN("g_cancel_path is not NULL");
-               MS_SAFE_FREE(g_cancel_path);
-       }
-
-       g_cancel_path = strdup(cancel_path);
-
-       return MS_MEDIA_ERR_NONE;
-}
-
 static int __msc_dir_scan_meta_update(void **handle, const char*start_path, const char *storage_id, ms_storage_type_t storage_type, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
@@ -1039,8 +1026,6 @@ int msc_remove_dir_scan_request(ms_comm_msg_s *recv_msg)
                goto END_REMOVE_REQUEST;
        }
 
-       msc_set_cancel_path(recv_msg->msg);
-
        temp_scan_queue = g_async_queue_new();
 
        for (i = 0; i < len; i++) {