diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/debug.c b/src/debug.c index 566b2b959..6951df149 100644 --- a/src/debug.c +++ b/src/debug.c @@ -334,9 +334,7 @@ void _redisAssertPrintClientInfo(redisClient *c) { char buf[128]; char *arg; - if (c->argv[j]->type == REDIS_STRING && - c->argv[j]->encoding == REDIS_ENCODING_RAW) - { + if (c->argv[j]->type == REDIS_STRING && sdsEncodedObject(c->argv[j])) { arg = (char*) c->argv[j]->ptr; } else { snprintf(buf,sizeof(buf),"Object type: %d, encoding: %d", @@ -352,7 +350,7 @@ void redisLogObjectDebugInfo(robj *o) { redisLog(REDIS_WARNING,"Object type: %d", o->type); redisLog(REDIS_WARNING,"Object encoding: %d", o->encoding); redisLog(REDIS_WARNING,"Object refcount: %d", o->refcount); - if (o->type == REDIS_STRING && o->encoding == REDIS_ENCODING_RAW) { + if (o->type == REDIS_STRING && sdsEncodedObject(o)) { redisLog(REDIS_WARNING,"Object raw string len: %d", sdslen(o->ptr)); if (sdslen(o->ptr) < 4096) redisLog(REDIS_WARNING,"Object raw string content: \"%s\"", (char*)o->ptr); |