summaryrefslogtreecommitdiff
path: root/main/loader.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2011-07-27 15:26:31 +0000
committerSean Bright <sean@malleable.com>2011-07-27 15:26:31 +0000
commit5858e755e4080f10e7c5bf3500c8c86831d69efe (patch)
tree3642141a64171aec8ec0a84a2265d5709842c169 /main/loader.c
parent353bcc99c11e1d11a682f2311aea2fb5866b49b5 (diff)
Merged revisions 329670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329670 | seanbright | 2011-07-27 11:25:53 -0400 (Wed, 27 Jul 2011) | 2 lines Sort the module list so that 'module show' is alphabetical. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/loader.c')
-rw-r--r--main/loader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/loader.c b/main/loader.c
index cb88e3463..5fe84449f 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -870,6 +870,12 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
res = start_resource(mod);
}
+ /* Now make sure that the list is sorted */
+ AST_LIST_LOCK(&module_list);
+ AST_LIST_REMOVE(&module_list, mod, entry);
+ AST_LIST_INSERT_SORTALPHA(&module_list, mod, entry, resource);
+ AST_LIST_UNLOCK(&module_list);
+
return res;
}