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
b6372f16
Commit
b6372f16
authored
Feb 01, 2019
by
antirez
Browse files
ACL: assign ACL command ID to modules commands.
parent
ec1aee03
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
b6372f16
...
@@ -684,6 +684,7 @@ int RM_CreateCommand(RedisModuleCtx *ctx, const char *name, RedisModuleCmdFunc c
...
@@ -684,6 +684,7 @@ int RM_CreateCommand(RedisModuleCtx *ctx, const char *name, RedisModuleCmdFunc c
cp
->
rediscmd
->
calls
=
0
;
cp
->
rediscmd
->
calls
=
0
;
dictAdd
(
server
.
commands
,
sdsdup
(
cmdname
),
cp
->
rediscmd
);
dictAdd
(
server
.
commands
,
sdsdup
(
cmdname
),
cp
->
rediscmd
);
dictAdd
(
server
.
orig_commands
,
sdsdup
(
cmdname
),
cp
->
rediscmd
);
dictAdd
(
server
.
orig_commands
,
sdsdup
(
cmdname
),
cp
->
rediscmd
);
cp
->
rediscmd
->
id
=
ACLGetCommandID
(
cmdname
);
/* ID used for ACL. */
return
REDISMODULE_OK
;
return
REDISMODULE_OK
;
}
}
...
...
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