diff options
author | David M. Lee <dlee@digium.com> | 2013-07-03 19:46:50 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-07-03 19:46:50 +0000 |
commit | dbc588b02f0da1caffc53faffd0a91b8f3047907 (patch) | |
tree | 61153022395c99939b5c8b9d1c397cc1c1dd30ca /rest-api-templates/ari_model_validators.c.mustache | |
parent | ef032842f161c7e1a5fe4e2886733926e1c3a61c (diff) |
Fix load errors related to the new ari_model_validators.
The Asterisk strategy of loading modules with RTLD_LAZY to extract metadata
from the module works well enough, until you try to take the address of a
function.
If a module takes the address of a function, that function needs to be
resolved at load time. That kinda defeats RTLD_LAZY.
This patch adds some ari_validator_{id}_fn() wrapper functions for safely
getting the function pointer from a different module.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api-templates/ari_model_validators.c.mustache')
-rw-r--r-- | rest-api-templates/ari_model_validators.c.mustache | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rest-api-templates/ari_model_validators.c.mustache b/rest-api-templates/ari_model_validators.c.mustache index 0e87f8e24..04a6d1111 100644 --- a/rest-api-templates/ari_model_validators.c.mustache +++ b/rest-api-templates/ari_model_validators.c.mustache @@ -112,6 +112,11 @@ int ari_validate_{{c_id}}(struct ast_json *json) {{/properties}} return res; } + +ari_validator ari_validate_{{c_id}}_fn(void) +{ + return ari_validate_{{c_id}}; +} {{/models}} {{/api_declaration}} {{/apis}} |