mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Add The Status Of A Module To The Output Of "CLI> module show"
When a module's configuration is not loadable, we still load the module but it is not in a running state. When trying to troubleshoot, let's say, why chan_motif is ignoring inbound XMPP traffic, there is no way to indicate that a loaded module is not currently running. (closes issue ASTERISK-21108) Reported by: Rusty Newton Tested by: Michael L. Young Patches: asterisk-21108_add_status-v2.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2331/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1240,7 +1240,7 @@ void ast_update_use_count(void)
|
||||
AST_LIST_UNLOCK(&updaters);
|
||||
}
|
||||
|
||||
int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *like),
|
||||
int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *status, const char *like),
|
||||
const char *like)
|
||||
{
|
||||
struct ast_module *cur;
|
||||
@@ -1251,7 +1251,8 @@ int ast_update_module_list(int (*modentry)(const char *module, const char *descr
|
||||
unlock = 0;
|
||||
|
||||
AST_LIST_TRAVERSE(&module_list, cur, entry) {
|
||||
total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount, like);
|
||||
total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
|
||||
cur->flags.running ? "Running" : "Not Running", like);
|
||||
}
|
||||
|
||||
if (unlock)
|
||||
|
Reference in New Issue
Block a user