mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
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:
@@ -89,7 +89,7 @@ static void stasis_http_{{c_nickname}}_cb(
|
||||
{{#response_class}}
|
||||
{{#is_list}}
|
||||
is_valid = ari_validate_list(response->message,
|
||||
ari_validate_{{c_singular_name}});
|
||||
ari_validate_{{c_singular_name}}_fn());
|
||||
{{/is_list}}
|
||||
{{^is_list}}
|
||||
is_valid = ari_validate_{{c_name}}(
|
||||
@@ -125,7 +125,7 @@ static void stasis_http_{{c_nickname}}_ws_cb(struct ast_websocket *ws_session,
|
||||
{{> param_parsing}}
|
||||
#if defined(AST_DEVMODE)
|
||||
session = ari_websocket_session_create(ws_session,
|
||||
ari_validate_{{response_class.c_name}});
|
||||
ari_validate_{{response_class.c_name}}_fn());
|
||||
#else
|
||||
session = ari_websocket_session_create(ws_session, NULL);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user