Remove unused parameter 14/166414/1
authorhj kim <backto.kim@samsung.com>
Wed, 10 Jan 2018 06:11:53 +0000 (15:11 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 10 Jan 2018 06:11:53 +0000 (15:11 +0900)
Change-Id: I781873ffd72cdd679e92becf826b0b0c703866fc

packaging/media-server.spec
src/scanner-v2/media-scanner-extract-v2.c
src/scanner-v2/media-scanner-scan-v2.c
src/scanner/media-scanner-scan.c

index 80a173f..85cad70 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       media-server
 Summary:    A server for media content management
-Version:    0.3.62
+Version:    0.3.63
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
index ee875a3..fbd5184 100755 (executable)
@@ -61,7 +61,7 @@ GMutex extract_data_mutex;
 #define LAST_EVENT 1
 #define NORMAL_EVENT 0
 
-static int __msc_check_extract_stop_status(int scan_type, ms_user_storage_type_e storage_type, const char *start_path, int pid, bool is_end);
+static int __msc_check_extract_stop_status(int scan_type, const char *start_path, int pid, bool is_end);
 static int __msc_set_storage_extract_status(ms_storage_scan_status_e status);
 static int __msc_get_storage_extract_status(ms_storage_scan_status_e *status);
 static int __msc_resume_extract();
@@ -131,7 +131,7 @@ int __msc_folder_bulk_extract(void **handle, const char* storage_id, int storage
                tmp_ret = MS_MEDIA_ERR_NONE;
                db_data = NULL;
 
-               ret = __msc_check_extract_stop_status(scan_type, storage_type, path, pid, is_end);
+               ret = __msc_check_extract_stop_status(scan_type, path, pid, is_end);
                if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
                        MS_DBG_ERR("__msc_folder_bulk_extract MS_MEDIA_ERR_SCANNER_FORCE_STOP");
                        break;
@@ -246,7 +246,7 @@ gboolean msc_folder_extract_thread(void *data)
                        goto NEXT;
                }
 
-               ret = __msc_check_extract_stop_status(extract_data->msg_type, storage_type, update_path, extract_data->pid, end_flag);
+               ret = __msc_check_extract_stop_status(extract_data->msg_type, update_path, extract_data->pid, end_flag);
 
                if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
                        MS_DBG_ERR("MS_MEDIA_ERR_SCANNER_FORCE_STOP");
@@ -424,7 +424,7 @@ gboolean msc_storage_extract_thread(void *data)
                __msc_pause_extract();
                MS_DBG_WARN("extract RESUME");
 
-               int tem_ret = __msc_check_extract_stop_status(extract_data->msg_type, storage_type, update_path, extract_data->pid, end_flag);
+               int tem_ret = __msc_check_extract_stop_status(extract_data->msg_type, update_path, extract_data->pid, end_flag);
                if (tem_ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
                        ms_set_storage_scan_status(handle, extract_data->storage_id, MEDIA_EXTRACT_STOP, uid);
                        __msc_set_storage_extract_status(MS_STORAGE_SCAN_META_STOP);
@@ -709,7 +709,7 @@ int msc_del_extract_blocked_path(const char* blocked_path)
        return MS_MEDIA_ERR_NONE;
 }
 
-static int __msc_check_extract_stop_status(int scan_type, ms_user_storage_type_e storage_type, const char *start_path, int pid, bool is_end)
+static int __msc_check_extract_stop_status(int scan_type, const char *start_path, int pid, bool is_end)
 {
        int ret = MS_MEDIA_ERR_NONE;
 
index 03e094f..d0a57af 100755 (executable)
@@ -91,7 +91,7 @@ struct linux_dirent {
 
 #define BUF_SIZE 1024
 
-static int __msc_check_stop_status(int scan_type, ms_user_storage_type_e storage_type, const char *start_path, int pid);
+static int __msc_check_stop_status(int scan_type, const char *start_path, int pid);
 static int __msc_db_update(void **handle, const char *storage_id, const ms_comm_msg_s * scan_data);
 static int __msc_make_file_list(char *file_path, GArray **path_array, uid_t uid);
 static int __msc_batch_insert(ms_msg_type_e current_msg, int pid, GArray *path_array, uid_t uid);
@@ -184,7 +184,7 @@ static int __msc_pause_scan()
        return MS_MEDIA_ERR_NONE;
 }
 
-static int __msc_check_stop_status(int scan_type, ms_user_storage_type_e storage_type, const char *start_path, int pid)
+static int __msc_check_stop_status(int scan_type, const char *start_path, int pid)
 {
        int ret = MS_MEDIA_ERR_NONE;
 
@@ -309,7 +309,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
        /*start db update. the number of element in the array , db update is complete.*/
        while (dir_array->len != 0) {
                /*check poweroff status*/
-               ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+               ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                if (ret != MS_MEDIA_ERR_NONE) {
                        if (is_recursive == true)
                                ms_change_validity_item_batch(handle, storage_id, new_start_path, 1, 2, uid);
@@ -379,7 +379,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
                        }
 
                        /*check poweroff status*/
-                       ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+                       ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                        if (ret != MS_MEDIA_ERR_NONE) {
                                if (is_recursive == true)
                                        ms_change_validity_item_batch(handle, storage_id, new_start_path, 1, 2, uid);
@@ -409,7 +409,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
 
                        for (bpos = 0; bpos < nread;) {
                                /*check poweroff status*/
-                               ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+                               ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                                if (ret != MS_MEDIA_ERR_NONE) {
                                        if (is_recursive == true)
                                                ms_change_validity_item_batch(handle, storage_id, new_start_path, 1, 2, uid);
@@ -492,7 +492,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
                                                if (scan_count >= MAX_SCAN_COUNT) {
                                                        scan_count = 0;
                                                        //MS_DBG_ERR("storage_id = [%s]", storage_id);
-                                                       ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+                                                       ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                                                        if (ret == MS_MEDIA_ERR_NONE) {
                                                                msc_insert_exactor_request(scan_type, FALSE, storage_id, current_path, pid, uid, MS_ITEM_UPDATE);
                                                        } else {
@@ -637,7 +637,7 @@ static int __msc_dir_scan_for_storage(void **handle, const char *storage_id, con
        /*start db update. the number of element in the array , db update is complete.*/
        while (dir_array->len != 0) {
                /*check poweroff status*/
-               ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+               ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                if (ret != MS_MEDIA_ERR_NONE)
                        goto STOP_SCAN;
 
@@ -709,7 +709,7 @@ static int __msc_dir_scan_for_storage(void **handle, const char *storage_id, con
                        }
 
                        /*check poweroff status*/
-                       ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+                       ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                        if (ret != MS_MEDIA_ERR_NONE)
                                goto STOP_SCAN;
 
@@ -729,7 +729,7 @@ static int __msc_dir_scan_for_storage(void **handle, const char *storage_id, con
 
                        for (bpos = 0; bpos < nread;) {
                                /*check poweroff status*/
-                               ret = __msc_check_stop_status(scan_type, storage_type, new_start_path, pid);
+                               ret = __msc_check_stop_status(scan_type, new_start_path, pid);
                                if (ret != MS_MEDIA_ERR_NONE)
                                        goto STOP_SCAN;
 
@@ -1185,7 +1185,7 @@ gboolean msc_directory_scan_thread(void *data)
                                while (1) {
                                        sleep(1);
 
-                                       ret = __msc_check_stop_status(scan_type, storage_type, scan_data->msg, scan_data->pid);
+                                       ret = __msc_check_stop_status(scan_type, scan_data->msg, scan_data->pid);
                                        if (ret != MS_MEDIA_ERR_NONE)
                                                goto NEXT;
 
@@ -1231,7 +1231,7 @@ gboolean msc_directory_scan_thread(void *data)
                                        while (1) {
                                                sleep(1);
 
-                                               ret = __msc_check_stop_status(scan_type, storage_type, scan_data->msg, scan_data->pid);
+                                               ret = __msc_check_stop_status(scan_type, scan_data->msg, scan_data->pid);
                                                if (ret != MS_MEDIA_ERR_NONE)
                                                        goto NEXT;
 
index da493e7..6821e39 100755 (executable)
@@ -38,7 +38,7 @@ GMutex scan_req_mutex;
 
 static int __msc_clear_file_list(GArray *path_array);
 
-static int __msc_check_stop_status(ms_user_storage_type_e storage_type)
+static int __msc_check_stop_status()
 {
        if (power_off) {
                MS_DBG_ERR("Power off");
@@ -48,7 +48,7 @@ static int __msc_check_stop_status(ms_user_storage_type_e storage_type)
        }
 }
 
-static int __msc_dir_scan(void **handle, const char *storage_id, const char*start_path, ms_user_storage_type_e storage_type, bool check_exists, bool is_recursive, uid_t uid)
+static int __msc_dir_scan(void **handle, const char *storage_id, const char*start_path, bool check_exists, bool is_recursive, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
        GDir *dir = NULL;
@@ -71,7 +71,7 @@ static int __msc_dir_scan(void **handle, const char *storage_id, const char*star
        scan_function = (check_exists == false) ? ms_insert_item_batch : ms_validate_item;
 
        while (dir_array->len != 0) {
-               ret = __msc_check_stop_status(storage_type);
+               ret = __msc_check_stop_status();
                if (ret != MS_MEDIA_ERR_NONE)
                        goto STOP_SCAN;
 
@@ -92,7 +92,7 @@ static int __msc_dir_scan(void **handle, const char *storage_id, const char*star
                                MS_DBG_ERR("insert folder failed");
 
                        while ((name = g_dir_read_name(dir))) {
-                               ret = __msc_check_stop_status(storage_type);
+                               ret = __msc_check_stop_status();
                                if (ret != MS_MEDIA_ERR_NONE) {
                                        ms_insert_folder_end(handle, uid);
                                        goto STOP_SCAN;
@@ -173,9 +173,9 @@ static int __msc_db_update(void **handle, const char *storage_id, const ms_comm_
        if (scan_type != MS_MSG_STORAGE_INVALID) {
                MS_DBG_INFO("INSERT");
                if (scan_type == MS_MSG_STORAGE_ALL)
-                       err = __msc_dir_scan(handle, storage_id, start_path, storage_type, false, true, scan_data->uid);
+                       err = __msc_dir_scan(handle, storage_id, start_path, false, true, scan_data->uid);
                else
-                       err = __msc_dir_scan(handle, storage_id, start_path, storage_type, true, true, scan_data->uid);
+                       err = __msc_dir_scan(handle, storage_id, start_path, true, true, scan_data->uid);
 
                if (err != MS_MEDIA_ERR_NONE)
                        MS_DBG_ERR("error : %d", err);
@@ -298,9 +298,9 @@ gboolean msc_directory_scan_thread(void *data)
                ms_bacth_commit_enable(handle, TRUE, TRUE, MS_NOTI_SWITCH_OFF, 0);
 
                if (noti_type == MS_ITEM_INSERT)
-                       ret = __msc_dir_scan(handle, storage_id, start_path, storage_type, false, is_recursive, scan_data->uid);
+                       ret = __msc_dir_scan(handle, storage_id, start_path, false, is_recursive, scan_data->uid);
                else
-                       ret = __msc_dir_scan(handle, storage_id, start_path, storage_type, true, is_recursive, scan_data->uid);
+                       ret = __msc_dir_scan(handle, storage_id, start_path, true, is_recursive, scan_data->uid);
 
                ms_bacth_commit_disable(handle, TRUE, TRUE, scan_data->uid);
 
@@ -735,7 +735,7 @@ _POWEROFF:
        return false;
 }
 
-static int __msc_dir_scan_meta_update(void **handle, const char*start_path, const char *storage_id, ms_user_storage_type_e storage_type, uid_t uid)
+static int __msc_dir_scan_meta_update(void **handle, const char*start_path, const char *storage_id, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
        GDir *dir = NULL;
@@ -763,7 +763,7 @@ static int __msc_dir_scan_meta_update(void **handle, const char*start_path, cons
        g_array_append_val(dir_array, tmp_path);
 
        while (dir_array->len != 0) {
-               ret = __msc_check_stop_status(storage_type);
+               ret = __msc_check_stop_status();
                if (ret != MS_MEDIA_ERR_NONE)
                        goto STOP_SCAN;
 
@@ -779,7 +779,7 @@ static int __msc_dir_scan_meta_update(void **handle, const char*start_path, cons
                dir = g_dir_open(current_path, 0, &error);
                if (error == NULL && dir != NULL) {
                        while ((name = g_dir_read_name(dir))) {
-                               ret = __msc_check_stop_status(storage_type);
+                               ret = __msc_check_stop_status();
                                if (ret != MS_MEDIA_ERR_NONE)
                                        goto STOP_SCAN;
 
@@ -832,7 +832,6 @@ gboolean msc_metadata_update(void *data)
        int ret = MS_MEDIA_ERR_NONE;
        int idx = 0;
        void **handle = NULL;
-       ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
        GArray *storage_list = NULL;
        ms_stg_info_s *stg_info = NULL;
        char *usr_path = NULL;
@@ -855,7 +854,7 @@ gboolean msc_metadata_update(void *data)
                return MS_MEDIA_ERR_INTERNAL;
        }
 
-       ret = __msc_dir_scan_meta_update(handle, usr_path, INTERNAL_STORAGE_ID, storage_type, scan_data->uid);
+       ret = __msc_dir_scan_meta_update(handle, usr_path, INTERNAL_STORAGE_ID, scan_data->uid);
        /* send notification */
        ms_send_dir_update_noti(handle, INTERNAL_STORAGE_ID, usr_path, NULL, MS_ITEM_UPDATE, scan_data->pid);
        MS_SAFE_FREE(usr_path);
@@ -880,7 +879,7 @@ gboolean msc_metadata_update(void *data)
                        continue;
                }
 
-               ret = __msc_dir_scan_meta_update(handle, stg_info->stg_path, stg_info->storage_id, storage_type, scan_data->uid);
+               ret = __msc_dir_scan_meta_update(handle, stg_info->stg_path, stg_info->storage_id, scan_data->uid);
                /* send notification */
                ms_send_dir_update_noti(handle, stg_info->storage_id, stg_info->stg_path, NULL, MS_ITEM_UPDATE, scan_data->pid);