summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2009-06-22 15:33:35 +0000
committerDavid Vossel <dvossel@digium.com>2009-06-22 15:33:35 +0000
commit87c865891238c85a18918ee11272396ea5a6182c (patch)
tree31ea2e2115668960dfa90bede6ce966aa01a6a67 /main
parentf142cbe10ca1781b3712cecc26d552c8a97809b6 (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@202410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 45b66612e..a8e986409 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -742,9 +742,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;
}
@@ -806,7 +805,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);
}
@@ -892,6 +891,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;
@@ -907,6 +909,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;
}
}