mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 14:51:04 +00:00
RESP3: Fix API in scripting.c leaving Lua conversions RESP2.
This commit is contained in:
parent
f07f3d729f
commit
9330bcc7ee
@ -315,7 +315,7 @@ void luaReplyToRedisReply(client *c, lua_State *lua) {
|
|||||||
sdsfree(ok);
|
sdsfree(ok);
|
||||||
lua_pop(lua,1);
|
lua_pop(lua,1);
|
||||||
} else {
|
} else {
|
||||||
void *replylen = addDeferredMultiBulkLength(c);
|
void *replylen = addReplyDeferredLen(c);
|
||||||
int j = 1, mbulklen = 0;
|
int j = 1, mbulklen = 0;
|
||||||
|
|
||||||
lua_pop(lua,1); /* Discard the 'ok' field value we popped */
|
lua_pop(lua,1); /* Discard the 'ok' field value we popped */
|
||||||
@ -330,7 +330,7 @@ void luaReplyToRedisReply(client *c, lua_State *lua) {
|
|||||||
luaReplyToRedisReply(c, lua);
|
luaReplyToRedisReply(c, lua);
|
||||||
mbulklen++;
|
mbulklen++;
|
||||||
}
|
}
|
||||||
setDeferredMultiBulkLength(c,replylen,mbulklen);
|
setDeferredArrayLen(c,replylen,mbulklen);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1501,7 +1501,7 @@ NULL
|
|||||||
} else if (c->argc >= 2 && !strcasecmp(c->argv[1]->ptr,"exists")) {
|
} else if (c->argc >= 2 && !strcasecmp(c->argv[1]->ptr,"exists")) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
addReplyMultiBulkLen(c, c->argc-2);
|
addReplyArrayLen(c, c->argc-2);
|
||||||
for (j = 2; j < c->argc; j++) {
|
for (j = 2; j < c->argc; j++) {
|
||||||
if (dictFind(server.lua_scripts,c->argv[j]->ptr))
|
if (dictFind(server.lua_scripts,c->argv[j]->ptr))
|
||||||
addReply(c,shared.cone);
|
addReply(c,shared.cone);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user