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
This commit is contained in:
David M. Lee
2013-07-03 19:46:50 +00:00
parent ef032842f1
commit dbc588b02f
11 changed files with 438 additions and 10 deletions

View File

@@ -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}}