Skip to content

Commit

Permalink
dump/restore fixed to use the new crc64 API.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Apr 9, 2012
1 parent 736b7c3 commit 4673864
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit 4673864

Please sign in to comment.