summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-12-29 03:57:17 -0500
committerCorey Farrell <git@cfware.com>2018-01-24 13:37:29 -0500
commit527cf5a57033820313356414b971fdf0f4382b21 (patch)
tree44810fb922062b5c2879cad1e9cb49b6d8772a80 /channels
parent7ce34f4e6a8a2bbfc3cfac9a4465eb0f71372205 (diff)
Remove redundant module checks and references.
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_pjsip.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 68da4a1bb..2c111feeb 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -2981,8 +2981,6 @@ static int load_module(void)
{
struct ao2_container *endpoints;
- CHECK_PJSIP_SESSION_MODULE_LOADED();
-
if (!(chan_pjsip_tech.capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
return AST_MODULE_LOAD_DECLINE;
}
@@ -3016,10 +3014,7 @@ static int load_module(void)
goto end;
}
- if (ast_sip_session_register_supplement(&chan_pjsip_supplement)) {
- ast_log(LOG_ERROR, "Unable to register PJSIP supplement\n");
- goto end;
- }
+ ast_sip_session_register_supplement(&chan_pjsip_supplement);
if (!(pjsip_uids_onhold = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK,
AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT, 37, uid_hold_hash_fn,
@@ -3028,26 +3023,9 @@ static int load_module(void)
goto end;
}
- if (ast_sip_session_register_supplement(&call_pickup_supplement)) {
- ast_log(LOG_ERROR, "Unable to register PJSIP call pickup supplement\n");
- ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
- goto end;
- }
-
- if (ast_sip_session_register_supplement(&pbx_start_supplement)) {
- ast_log(LOG_ERROR, "Unable to register PJSIP pbx start supplement\n");
- ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
- ast_sip_session_unregister_supplement(&call_pickup_supplement);
- goto end;
- }
-
- if (ast_sip_session_register_supplement(&chan_pjsip_ack_supplement)) {
- ast_log(LOG_ERROR, "Unable to register PJSIP ACK supplement\n");
- ast_sip_session_unregister_supplement(&pbx_start_supplement);
- ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
- ast_sip_session_unregister_supplement(&call_pickup_supplement);
- goto end;
- }
+ ast_sip_session_register_supplement(&call_pickup_supplement);
+ ast_sip_session_register_supplement(&pbx_start_supplement);
+ ast_sip_session_register_supplement(&chan_pjsip_ack_supplement);
if (pjsip_channel_cli_register()) {
ast_log(LOG_ERROR, "Unable to register PJSIP Channel CLI\n");