aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-06 19:11:35 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-06 19:11:35 +0000
commitf1912af11e18b49a7747fa544f42e770444c45a2 (patch)
tree9c57481426201ad97efce69fe0d9338fb3166570 /main
parentbc5b236212cc8d348f60cf0b43ea05b67989f191 (diff)
Add a new module flag to indicate that a build sum is present. Modules built
against older Asterisk 1.4 headers will now load properly with just a warning indicating that they are old and may cause problems. (patch by paravoid) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91501 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/loader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/loader.c b/main/loader.c
index aa17fcb31..d920c0c07 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -616,8 +616,10 @@ static unsigned int inspect_module(const struct ast_module *mod)
return 1;
}
- if (!ast_strlen_zero(mod->info->buildopt_sum) &&
- strcmp(buildopt_sum, mod->info->buildopt_sum)) {
+ if (!ast_test_flag(mod->info, AST_MODFLAG_BUILDSUM)) {
+ ast_log(LOG_WARNING, "Module '%s' was not compiled against a recent version of Asterisk and may cause instability.\n", mod->resource);
+ } else if (!ast_strlen_zero(mod->info->buildopt_sum) &&
+ strcmp(buildopt_sum, mod->info->buildopt_sum)) {
ast_log(LOG_WARNING, "Module '%s' was not compiled with the same compile-time options as this version of Asterisk.\n", mod->resource);
ast_log(LOG_WARNING, "Module '%s' will not be initialized as it may cause instability.\n", mod->resource);
return 1;