X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/cc2750670f1cb2fafde3e7d1a340f6674dab1749..45029d37cb7fe589bdfd9a08dd5a3afd611ad57e:/src/diskstore.c?ds=sidebyside diff --git a/src/diskstore.c b/src/diskstore.c index 382afb4f..9e86364e 100644 --- a/src/diskstore.c +++ b/src/diskstore.c @@ -183,7 +183,7 @@ int dsKeyToPath(redisDb *db, char *buf, robj *key) { return (buf-origbuf)+41; } -int dsSet(redisDb *db, robj *key, robj *val) { +int dsSet(redisDb *db, robj *key, robj *val, time_t expire) { char buf[1024], buf2[1024]; FILE *fp; int retval, len; @@ -201,7 +201,7 @@ int dsSet(redisDb *db, robj *key, robj *val) { redisPanic("Unrecoverable diskstore error. Exiting."); } } - if ((retval = rdbSaveKeyValuePair(fp,db,key,val,time(NULL))) == -1) + if ((retval = rdbSaveKeyValuePair(fp,key,val,expire,time(NULL))) == -1) return REDIS_ERR; fclose(fp); if (retval == 0) { @@ -456,7 +456,7 @@ void *dsRdbSave_thread(void *arg) { /* Use RENAME to make sure the DB file is changed atomically only * if the generate DB file is ok. */ if (rename(tmpfile,filename) == -1) { - redisLog(REDIS_WARNING,"Error moving temp DB file on the final destination: %s", strerror(errno)); + redisLog(REDIS_WARNING,"Error moving temp DB file on the final destination: %s (diskstore)", strerror(errno)); unlink(tmpfile); dsRdbSaveSetState(REDIS_BGSAVE_THREAD_DONE_ERR); return NULL;