mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Minor config updates, add module counts (bug #2593)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
loader.c
4
loader.c
@@ -464,16 +464,18 @@ int ast_update_module_list(int (*modentry)(char *module, char *description, int
|
||||
{
|
||||
struct module *m;
|
||||
int unlock = -1;
|
||||
int total_mod_loaded = 0;
|
||||
if (ast_mutex_trylock(&modlock))
|
||||
unlock = 0;
|
||||
m = module_list;
|
||||
while(m) {
|
||||
modentry(m->resource, m->description(), m->usecount());
|
||||
m = m->next;
|
||||
total_mod_loaded++;
|
||||
}
|
||||
if (unlock)
|
||||
ast_mutex_unlock(&modlock);
|
||||
return 0;
|
||||
return total_mod_loaded;
|
||||
}
|
||||
|
||||
int ast_loader_register(int (*v)(void))
|
||||
|
Reference in New Issue
Block a user