[asterisk-commits] file: trunk r419612 - /trunk/main/loader.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 25 13:09:42 CDT 2014
Author: file
Date: Fri Jul 25 13:09:40 2014
New Revision: 419612
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419612
Log:
loader: Fix an infinite loop when printing modules using "module show".
When creating the alphabetical sorted list each module is added to a list
temporarily. On the second iteration each module already has a pointer to
another module, causing stuff to go into a loop.
Modified:
trunk/main/loader.c
Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=419612&r1=419611&r2=419612
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Fri Jul 25 13:09:40 2014
@@ -1368,7 +1368,7 @@
AST_LIST_INSERT_SORTALPHA(&alpha_module_list, cur, list_entry, resource);
}
- AST_LIST_TRAVERSE(&alpha_module_list, cur, list_entry) {
+ while ((cur = AST_LIST_REMOVE_HEAD(&alpha_module_list, list_entry))) {
total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
cur->flags.running ? "Running" : "Not Running", like, cur->info->support_level);
}
More information about the asterisk-commits
mailing list