media.db no longer provides version information.
Change-Id: Ifc649f2885b23eb467c731e35aa35bb7ca5895df
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
int ms_insert_folder(sqlite3 *handle, const char *storage_id, const char *path, uid_t uid);
int ms_delete_invalid_folder(const char *storage_id, uid_t uid);
int ms_set_folder_validity(sqlite3 *handle, const char *storage_id, const char *start_path, int validity, bool is_recursive, uid_t uid);
-int ms_check_db_upgrade(sqlite3 *handle, uid_t uid);
+int ms_check_db(sqlite3 *handle, uid_t uid);
int ms_check_storage(sqlite3 *handle, const char *storage_id, char **storage_path, int *validity, uid_t uid);
int ms_insert_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid);
int ms_update_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid);
return ret;
}
-int ms_check_db_upgrade(sqlite3 *handle, uid_t uid)
+int ms_check_db(sqlite3 *handle, uid_t uid)
{
int ret = MS_MEDIA_ERR_NONE;
ms_connect_db(&handle, uid);
MS_DBG_WARN("START WRITE SCHEMA");
- if (ms_check_db_upgrade(handle, uid) != MS_MEDIA_ERR_NONE)
- MS_DBG_ERR("ms_check_db_upgrade fail");
+ if (ms_check_db(handle, uid) != MS_MEDIA_ERR_NONE)
+ MS_DBG_ERR("ms_check_db fail");
MS_DBG_WARN("END WRITE SCHEMA");
if (mount_path != NULL && mount_uuid != NULL) {
/*CHECK DB HERE */
uuid = g_strndup(mount_uuid, strlen(mount_uuid));
- ret = ms_check_db_upgrade(handle, uid);
+ ret = ms_check_db(handle, uid);
if (ret != MS_MEDIA_ERR_NONE) {
- MS_DBG_ERR("ms_check_db_upgrade failed");
+ MS_DBG_ERR("ms_check_db failed");
goto ERROR;
}
return ret;
}
#endif
-
return;
}
- ret = ms_check_db_upgrade(db_handle, uid);
+ ret = ms_check_db(db_handle, uid);
if (ret != MS_MEDIA_ERR_NONE) {
- MS_DBG_ERR("ms_check_db_upgrade failed [%d]", ret);
+ MS_DBG_ERR("ms_check_db failed [%d]", ret);
ms_disconnect_db(db_handle);
return;
}
ms_connect_db(&handle, uid);
MS_DBG_WARN("START WRITE SCHEMA");
- if (ms_check_db_upgrade(handle, uid) != MS_MEDIA_ERR_NONE)
- MS_DBG_ERR("ms_check_db_upgrade fail");
+ if (ms_check_db(handle, uid) != MS_MEDIA_ERR_NONE)
+ MS_DBG_ERR("ms_check_db fail");
MS_DBG_WARN("END WRITE SCHEMA");
return ms_send_scan_request(&scan_msg, -1);
}
-