diff options
Diffstat (limited to 'res/res_pjsip/pjsip_distributor.c')
-rw-r--r-- | res/res_pjsip/pjsip_distributor.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c index 90744fdf0..e32f02833 100644 --- a/res/res_pjsip/pjsip_distributor.c +++ b/res/res_pjsip/pjsip_distributor.c @@ -21,6 +21,7 @@ #include <pjsip.h> #include "asterisk/res_pjsip.h" +#include "include/res_pjsip_private.h" static int distribute(void *data); static pj_bool_t distributor(pjsip_rx_data *rdata); @@ -222,7 +223,7 @@ struct ast_sip_auth *ast_sip_get_artificial_auth(void) return artificial_auth; } -static struct ast_sip_endpoint *artificial_endpoint; +static struct ast_sip_endpoint *artificial_endpoint = NULL; static int create_artificial_endpoint(void) { @@ -236,7 +237,7 @@ static int create_artificial_endpoint(void) * the proper size of the vector is returned. This value is * not actually used anywhere */ - AST_VECTOR_APPEND(&artificial_endpoint->inbound_auths, "artificial-auth"); + AST_VECTOR_APPEND(&artificial_endpoint->inbound_auths, ast_strdup("artificial-auth")); return 0; } @@ -373,13 +374,13 @@ int ast_sip_initialize_distributor(void) return -1; } - if (ast_sip_register_service(&distributor_mod)) { + if (internal_sip_register_service(&distributor_mod)) { return -1; } - if (ast_sip_register_service(&endpoint_mod)) { + if (internal_sip_register_service(&endpoint_mod)) { return -1; } - if (ast_sip_register_service(&auth_mod)) { + if (internal_sip_register_service(&auth_mod)) { return -1; } @@ -388,9 +389,9 @@ int ast_sip_initialize_distributor(void) void ast_sip_destroy_distributor(void) { - ast_sip_unregister_service(&distributor_mod); - ast_sip_unregister_service(&endpoint_mod); - ast_sip_unregister_service(&auth_mod); + internal_sip_unregister_service(&distributor_mod); + internal_sip_unregister_service(&endpoint_mod); + internal_sip_unregister_service(&auth_mod); ao2_cleanup(artificial_auth); ao2_cleanup(artificial_endpoint); |