mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
dump/restore fixed to use the new crc64 API.
This commit is contained in:
parent
736b7c3f04
commit
46738646d4
@ -1486,7 +1486,7 @@ void createDumpPayload(rio *payload, robj *o) {
|
||||
payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,buf,2);
|
||||
|
||||
/* CRC64 */
|
||||
crc = crc64((unsigned char*)payload->io.buffer.ptr,
|
||||
crc = crc64(0,(unsigned char*)payload->io.buffer.ptr,
|
||||
sdslen(payload->io.buffer.ptr));
|
||||
memrev64ifbe(&crc);
|
||||
payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,&crc,8);
|
||||
@ -1510,7 +1510,7 @@ int verifyDumpPayload(unsigned char *p, size_t len) {
|
||||
if (rdbver != REDIS_RDB_VERSION) return REDIS_ERR;
|
||||
|
||||
/* Verify CRC64 */
|
||||
crc = crc64(p,len-8);
|
||||
crc = crc64(0,p,len-8);
|
||||
memrev64ifbe(&crc);
|
||||
return (memcmp(&crc,footer+2,8) == 0) ? REDIS_OK : REDIS_ERR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user