{
MS_DBG_WARN("begin of __msc_folder_bulk_extract");
int ret = MS_MEDIA_ERR_NONE;
- int tmp_ret = MS_MEDIA_ERR_NONE;
GArray *data_array = NULL;
ms_item_info_s* db_data = NULL;
- int extract_count = 0;
int sleep_count = 0;
ret = ms_get_extract_list(handle, storage_id, storage_type, scan_type, path, is_end, uid, (void *)&data_array);
MS_DBG_RETVM_IF(!data_array, MS_MEDIA_ERR_NONE, "data_array is NULL!!!");
while (data_array->len != 0) {
- tmp_ret = MS_MEDIA_ERR_NONE;
db_data = NULL;
ret = __msc_check_extract_stop_status(scan_type, path, pid, is_end);
g_array_remove_index(data_array, 0);
g_mutex_lock(&decode_mutex);
- tmp_ret = ms_update_one_extract_item(handle, storage_id, storage_type, db_data);
+ ms_update_one_extract_item(handle, storage_id, storage_type, db_data);
g_mutex_unlock(&decode_mutex);
- if (tmp_ret == MS_MEDIA_ERR_NONE)
- extract_count++;
if (db_data) {
- MS_SAFE_FREE(db_data->path);
- MS_SAFE_FREE(db_data);
+ g_free(db_data->path);
+ g_free(db_data);
db_data = NULL;
}
}
}
- if (extract_count > 0)
- ms_query_do_update_list(handle);
-
while (data_array->len != 0) {
- db_data = NULL;
db_data = g_array_index(data_array, ms_item_info_s *, 0);
g_array_remove_index(data_array, 0);
if (db_data) {
- MS_SAFE_FREE(db_data->path);
- MS_SAFE_FREE(db_data);
+ g_free(db_data->path);
+ g_free(db_data);
db_data = NULL;
}
}