Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
46738646
Commit
46738646
authored
Apr 09, 2012
by
antirez
Browse files
dump/restore fixed to use the new crc64 API.
parent
736b7c3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
46738646
...
...
@@ -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;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment