mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 08:41:21 +00:00
ACL: show categories in COMMAND reply
Adding another new filed categories at the end of command reply, it's easy to read and distinguish flags and categories, also compatible with old format.
This commit is contained in:
@ -3698,8 +3698,8 @@ void addReplyCommand(client *c, struct redisCommand *cmd) {
|
||||
if (!cmd) {
|
||||
addReplyNull(c);
|
||||
} else {
|
||||
/* We are adding: command name, arg count, flags, first, last, offset */
|
||||
addReplyArrayLen(c, 6);
|
||||
/* We are adding: command name, arg count, flags, first, last, offset, categories */
|
||||
addReplyArrayLen(c, 7);
|
||||
addReplyBulkCString(c, cmd->name);
|
||||
addReplyLongLong(c, cmd->arity);
|
||||
|
||||
@ -3729,6 +3729,8 @@ void addReplyCommand(client *c, struct redisCommand *cmd) {
|
||||
addReplyLongLong(c, cmd->firstkey);
|
||||
addReplyLongLong(c, cmd->lastkey);
|
||||
addReplyLongLong(c, cmd->keystep);
|
||||
|
||||
addReplyCommandCategories(c,cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user