Sort the module list so that 'module show' is alphabetical.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@329670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Sean Bright
2011-07-27 15:25:53 +00:00
parent 8fd96973bc
commit 062da64209

View File

@@ -870,6 +870,12 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
res = start_resource(mod); 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; return res;
} }