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
2ff53060
Commit
2ff53060
authored
May 12, 2021
by
zhaozhao.zz
Committed by
Oran Agra
Jun 01, 2021
Browse files
Modules: show path and args in LIST reply
parent
babe3c7b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
2ff53060
...
@@ -8667,11 +8667,19 @@ void addReplyLoadedModules(client *c) {
...
@@ -8667,11 +8667,19 @@ void addReplyLoadedModules(client *c) {
while ((de = dictNext(di)) != NULL) {
while ((de = dictNext(di)) != NULL) {
sds name = dictGetKey(de);
sds name = dictGetKey(de);
struct RedisModule *module = dictGetVal(de);
struct RedisModule *module = dictGetVal(de);
addReplyMapLen(c,2);
sds path = module->loadmod->path;
addReplyMapLen(c,4);
addReplyBulkCString(c,"name");
addReplyBulkCString(c,"name");
addReplyBulkCBuffer(c,name,sdslen(name));
addReplyBulkCBuffer(c,name,sdslen(name));
addReplyBulkCString(c,"ver");
addReplyBulkCString(c,"ver");
addReplyLongLong(c,module->ver);
addReplyLongLong(c,module->ver);
addReplyBulkCString(c,"path");
addReplyBulkCBuffer(c,path,sdslen(path));
addReplyBulkCString(c,"args");
addReplyArrayLen(c,module->loadmod->argc);
for (int i = 0; i < module->loadmod->argc; i++) {
addReplyBulk(c,module->loadmod->argv[i]);
}
}
}
dictReleaseIterator(di);
dictReleaseIterator(di);
}
}
...
...
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