| 7067 | } |
| 7068 | |
| 7069 | sds modulesCollectInfo(sds info, const char *section, int for_crash_report, int sections) { |
| 7070 | dictIterator *di = dictGetIterator(modules); |
| 7071 | dictEntry *de; |
| 7072 | |
| 7073 | while ((de = dictNext(di)) != NULL) { |
| 7074 | struct RedisModule *module = dictGetVal(de); |
| 7075 | if (!module->info_cb) |
| 7076 | continue; |
| 7077 | RedisModuleInfoCtx info_ctx = {module, section, info, sections, 0, 0}; |
| 7078 | module->info_cb(&info_ctx, for_crash_report); |
| 7079 | /* Implicitly end dicts (no way to handle errors, and we must add the newline). */ |
| 7080 | if (info_ctx.in_dict_field) |
| 7081 | RM_InfoEndDictField(&info_ctx); |
| 7082 | info = info_ctx.info; |
| 7083 | sections = info_ctx.sections; |
| 7084 | } |
| 7085 | dictReleaseIterator(di); |
| 7086 | return info; |
| 7087 | } |
| 7088 | |
| 7089 | /* Get information about the server similar to the one that returns from the |
| 7090 | * INFO command. This function takes an optional 'section' argument that may |
no test coverage detected