| 7259 | } |
| 7260 | |
| 7261 | sds modulesCollectInfo(sds info, const char *section, int for_crash_report, int sections) { |
| 7262 | dictIterator *di = dictGetIterator(modules); |
| 7263 | dictEntry *de; |
| 7264 | |
| 7265 | while ((de = dictNext(di)) != NULL) { |
| 7266 | struct RedisModule *module = (RedisModule*)dictGetVal(de); |
| 7267 | if (!module->info_cb) |
| 7268 | continue; |
| 7269 | RedisModuleInfoCtx info_ctx = {module, section, info, sections, 0, 0}; |
| 7270 | module->info_cb(&info_ctx, for_crash_report); |
| 7271 | /* Implicitly end dicts (no way to handle errors, and we must add the newline). */ |
| 7272 | if (info_ctx.in_dict_field) |
| 7273 | RM_InfoEndDictField(&info_ctx); |
| 7274 | info = info_ctx.info; |
| 7275 | sections = info_ctx.sections; |
| 7276 | } |
| 7277 | dictReleaseIterator(di); |
| 7278 | return info; |
| 7279 | } |
| 7280 | |
| 7281 | /* Get information about the server similar to the one that returns from the |
| 7282 | * INFO command. This function takes an optional 'section' argument that may |
no test coverage detected