@ -14878,7 +14878,7 @@ container_fail:
if ( calltoken_ignores ) {
ao2_ref ( calltoken_ignores , - 1 ) ;
}
return AST_MODULE_LOAD_FAILURE ;
return - 1 ;
}
@ -15083,12 +15083,14 @@ static int load_module(void)
struct iax2_registry * reg = NULL ;
if ( ! ( iax2_tech . capabilities = ast_format_cap_alloc ( AST_FORMAT_CAP_FLAG_DEFAULT ) ) ) {
return AST_MODULE_LOAD_ FAILUR E;
return AST_MODULE_LOAD_ DECLIN E;
}
ast_format_cap_append_by_type ( iax2_tech . capabilities , AST_MEDIA_TYPE_UNKNOWN ) ;
if ( load_objects ( ) ) {
return AST_MODULE_LOAD_FAILURE ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
return AST_MODULE_LOAD_DECLINE ;
}
memset ( iaxs , 0 , sizeof ( iaxs ) ) ;
@ -15099,28 +15101,36 @@ static int load_module(void)
if ( ! ( sched = ast_sched_context_create ( ) ) ) {
ast_log ( LOG_ERROR , " Failed to create scheduler thread \n " ) ;
return AST_MODULE_LOAD_FAILURE ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
return AST_MODULE_LOAD_DECLINE ;
}
if ( ast_sched_start_thread ( sched ) ) {
ast_sched_context_destroy ( sched ) ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
sched = NULL ;
return AST_MODULE_LOAD_FAILURE ;
return AST_MODULE_LOAD_ DECLIN E;
}
if ( ! ( io = io_context_create ( ) ) ) {
ast_log ( LOG_ERROR , " Failed to create I/O context \n " ) ;
ast_sched_context_destroy ( sched ) ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
sched = NULL ;
return AST_MODULE_LOAD_FAILURE ;
return AST_MODULE_LOAD_ DECLIN E;
}
if ( ! ( netsock = ast_netsock_list_alloc ( ) ) ) {
ast_log ( LOG_ERROR , " Failed to create netsock list \n " ) ;
io_context_destroy ( io ) ;
ast_sched_context_destroy ( sched ) ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
sched = NULL ;
return AST_MODULE_LOAD_FAILURE ;
return AST_MODULE_LOAD_ DECLIN E;
}
ast_netsock_init ( netsock ) ;
@ -15129,8 +15139,10 @@ static int load_module(void)
ast_log ( LOG_ERROR , " Could not allocate outsock list. \n " ) ;
io_context_destroy ( io ) ;
ast_sched_context_destroy ( sched ) ;
ao2_ref ( iax2_tech . capabilities , - 1 ) ;
iax2_tech . capabilities = NULL ;
sched = NULL ;
return AST_MODULE_LOAD_FAILURE ;
return AST_MODULE_LOAD_ DECLIN E;
}
ast_netsock_init ( outsock ) ;
@ -15149,6 +15161,7 @@ static int load_module(void)
ast_timer_close ( timer ) ;
timer = NULL ;
}
__unload_module ( ) ;
return AST_MODULE_LOAD_DECLINE ;
}
@ -15174,7 +15187,7 @@ static int load_module(void)
if ( ast_channel_register ( & iax2_tech ) ) {
ast_log ( LOG_ERROR , " Unable to register channel class %s \n " , " IAX2 " ) ;
__unload_module ( ) ;
return AST_MODULE_LOAD_ FAILUR E;
return AST_MODULE_LOAD_ DECLIN E;
}
if ( ast_register_switch ( & iax2_switch ) ) {
@ -15184,7 +15197,7 @@ static int load_module(void)
if ( start_network_thread ( ) ) {
ast_log ( LOG_ERROR , " Unable to start network thread \n " ) ;
__unload_module ( ) ;
return AST_MODULE_LOAD_ FAILUR E;
return AST_MODULE_LOAD_ DECLIN E;
} else {
ast_verb ( 2 , " IAX Ready and Listening \n " ) ;
}