diff options
author | antirez <antirez@gmail.com> | 2013-07-22 10:36:27 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-07-22 10:36:27 +0200 |
commit | a31693417dba3b2ddad46386778e191daef85e21 (patch) | |
tree | a97895e655986c93e158d39cb38013ca51117b90 | |
parent | 894eba07c8484c0f34b09d54a84e69314c37c427 (diff) | |
download | redis-a31693417dba3b2ddad46386778e191daef85e21.tar.gz |
Fix replicationFeedSlaves() to use sdsEncodedObject() macro.
-rw-r--r-- | src/replication.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/replication.c b/src/replication.c index 8b4c1b7c5..3e8964ddd 100644 --- a/src/replication.c +++ b/src/replication.c @@ -200,10 +200,11 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { char *objptr; if (argv[j]->encoding != REDIS_ENCODING_RAW && - argv[j]->encoding != REDIS_ENCODING_INT) { + argv[j]->encoding != REDIS_ENCODING_INT && + argv[j]->encoding != REDIS_ENCODING_EMBSTR) { redisPanic("Unexpected encoding"); } - if (argv[j]->encoding == REDIS_ENCODING_RAW) { + if (sdsEncodedObject(argv[j])) { objlen = sdslen(argv[j]->ptr); objptr = argv[j]->ptr; } else { |