Fix database time migration for Android: store time_t as 64bits in database

This commit is contained in:
Gautier Pelloux-Prayer 2014-11-12 15:08:54 +01:00
parent 0aabc05145
commit e45b7bc3f0
2 changed files with 2 additions and 2 deletions

View file

@ -469,7 +469,7 @@ static int migrate_messages_timestamp(void* data,int argc, char** argv, char** c
time_t new_time = parse_time_from_db(argv[1]);
if( new_time ){
/* replace 'time' by -1 and set 'utc' to the timestamp */
char *buf = sqlite3_mprintf("UPDATE history SET utc=%lld,time='-1' WHERE id=%i;", new_time, atoi(argv[0]));
char *buf = sqlite3_mprintf("UPDATE history SET utc=%lld,time='-1' WHERE id=%i;", (int64_t)new_time, atoi(argv[0]));
if( buf) {
linphone_sql_request((sqlite3*)data, buf);
sqlite3_free(buf);

2
oRTP

@ -1 +1 @@
Subproject commit 486604095db3f2ed4cb3fa8d30c45baf191d79e0
Subproject commit a8dcd5b3ee563b5746199a605b94459308f5d009