mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
More rioRead()
This commit is contained in:
parent
221782ccc6
commit
fd535c5862
@ -956,7 +956,8 @@ int rdbLoad(char *filename) {
|
|||||||
|
|
||||||
fp = fopen(filename,"r");
|
fp = fopen(filename,"r");
|
||||||
if (!fp) return REDIS_ERR;
|
if (!fp) return REDIS_ERR;
|
||||||
if (fread(buf,9,1,fp) == 0) goto eoferr;
|
rdb = rioInitWithFile(fp);
|
||||||
|
if (rioRead(&rdb,buf,9) == 0) goto eoferr;
|
||||||
buf[9] = '\0';
|
buf[9] = '\0';
|
||||||
if (memcmp(buf,"REDIS",5) != 0) {
|
if (memcmp(buf,"REDIS",5) != 0) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@ -971,7 +972,6 @@ int rdbLoad(char *filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
startLoading(fp);
|
startLoading(fp);
|
||||||
rdb = rioInitWithFile(fp);
|
|
||||||
while(1) {
|
while(1) {
|
||||||
robj *key, *val;
|
robj *key, *val;
|
||||||
expiretime = -1;
|
expiretime = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user