summaryrefslogtreecommitdiff
path: root/include/asterisk/module.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-11-16 16:56:59 +0000
committerKevin P. Fleming <kpfleming@digium.com>2007-11-16 16:56:59 +0000
commit547306835ea0dcb7f8ea05de79b6f976de89ae9e (patch)
tree0d395555e9304d52b8ccbff9c41623565280a6b9 /include/asterisk/module.h
parent2f7440932c2ec97bf61d4f1577b1a56bb6b03e1b (diff)
Merged revisions 89325 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89325 | kpfleming | 2007-11-16 10:47:46 -0600 (Fri, 16 Nov 2007) | 4 lines To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash. If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/module.h')
-rw-r--r--include/asterisk/module.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index 4c6cc507b..119ae88f0 100644
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -216,6 +216,7 @@ struct ast_module_info {
const char *key;
unsigned int flags;
+ unsigned int buildopt_sum[4]; /* The value of AST_BUILDOPT_SUM when this module was compiled */
};
void ast_module_register(const struct ast_module_info *);
@@ -242,7 +243,8 @@ void ast_module_unref(struct ast_module *);
AST_MODULE, \
desc, \
keystr, \
- flags_to_set \
+ flags_to_set, \
+ AST_BUILDOPT_SUM, \
}; \
static void __attribute__ ((constructor)) __reg_module(void) \
{ \
@@ -343,6 +345,7 @@ static void __restore_globals(void)
.flags = flags_to_set, \
.description = desc, \
.key = keystr, \
+ .buildopt_sum = AST_BUILDOPT_SUM, \
fields \
}; \
static void __attribute__ ((constructor)) __reg_module(void) \