}
// 0 : remove, -1: error or skip by diff_time
-int dp_db_remove_database(char *pkgname, long now_time, long diff_time)
+int dp_db_remove_database(char *pkgname, long long now_time, long long diff_time)
{
// get file name
char *database = __dp_db_get_client_db_path(pkgname);
}
int result = -1;
// get modified time of database file.
- long modified_time = dp_get_file_modified_time(database);
+ long long modified_time = dp_get_file_modified_time(database);
if (modified_time >= now_time) {
- TRACE_ERROR("check system timezone %ld vs %ld", modified_time, now_time);
+ TRACE_ERROR("check system timezone %lld vs %lld", modified_time, now_time);
} else if ((now_time - modified_time) > diff_time) {
char *database_journal = sqlite3_mprintf("%s-journal", database);
if (database_journal == NULL) {
return -1;
}
-long dp_get_file_modified_time(const char *file_path)
+long long dp_get_file_modified_time(const char *file_path)
{
struct stat file_state;
int stat_ret;
int dp_db_open_client_manager(void **handle, int *errorcode);
int dp_db_open_client(void **handle, char *pkgname, int *errorcode);
int dp_db_open_client_v2(void **handle, char *pkgname);
-int dp_db_remove_database(char *pkgname, long now_time, long diff_time);
+int dp_db_remove_database(char *pkgname, long long now_time, long long diff_time);
int dp_db_get_ids(void *handle, const char *table, char *idcolumn, int *ids, const char *where, const int limit, char *ordercolumn, char *ordering, int *error);
int dp_db_get_crashed_ids(void *handle, const char *table, int *ids, const int limit, int *error);
void dp_db_close(void *handle);
char *dp_strdup(char *src);
int dp_is_file_exist(const char *file_path);
-long dp_get_file_modified_time(const char *file_path);
+long long dp_get_file_modified_time(const char *file_path);
int dp_remove_file(const char *file_path);
#endif