aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-22 15:41:56 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-22 15:41:56 +0000
commitee0639746f40230f99ceff7bbbe6d6aa3f311d9f (patch)
tree844b74e19b3a0fc3b3d301d7f710259c59f47a20 /main
parentd6362279fbec72da78ca9a60758bedeaac1a4661 (diff)
Merged revisions 202410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r202410 | dvossel | 2009-06-22 10:33:35 -0500 (Mon, 22 Jun 2009) | 5 lines attempting to load running modules Modules placed in the priority heap for loading were not properly removed from the linked list. This resulted in some modules attempting to load twice. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@202412 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/loader.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/main/loader.c b/main/loader.c
index e6e688307..ba6af732d 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -743,9 +743,8 @@ static enum ast_module_load_result start_resource(struct ast_module *mod)
mod->flags.declined = 1;
break;
case AST_MODULE_LOAD_FAILURE:
- break;
- case AST_MODULE_LOAD_SKIP:
- /* modules should never return this value */
+ case AST_MODULE_LOAD_SKIP: /* modules should never return this value */
+ case AST_MODULE_LOAD_PRIORITY:
break;
}
@@ -807,7 +806,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
if (resource_heap) {
ast_heap_push(resource_heap, mod);
- res = AST_MODULE_LOAD_SKIP;
+ res = AST_MODULE_LOAD_PRIORITY;
} else {
res = start_resource(mod);
}
@@ -893,6 +892,9 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
goto done;
case AST_MODULE_LOAD_SKIP:
break;
+ case AST_MODULE_LOAD_PRIORITY:
+ AST_LIST_REMOVE_CURRENT(entry);
+ break;
}
}
AST_LIST_TRAVERSE_SAFE_END;
@@ -908,6 +910,7 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
res = -1;
goto done;
case AST_MODULE_LOAD_SKIP:
+ case AST_MODULE_LOAD_PRIORITY:
break;
}
}