--- channels/chan_mgcp.c (svn) +++ channels/chan_mgcp.c (working copy) @@ -4279,20 +4279,20 @@ return -1; } - if (!(res = reload_config())) { - /* Make sure we can register our mgcp channel type */ - if (ast_channel_register(&mgcp_tech)) { - ast_log(LOG_ERROR, "Unable to register channel class 'MGCP'\n"); - return -1; - } - ast_rtp_proto_register(&mgcp_rtp); - ast_cli_register_multiple(cli_mgcp, sizeof(cli_mgcp) / sizeof(struct ast_cli_entry)); - - /* And start the monitor for the first time */ - restart_monitor(); - } else + if (res = reload_config()) return AST_MODULE_LOAD_DECLINE; + /* Make sure we can register our mgcp channel type */ + if (ast_channel_register(&mgcp_tech)) { + ast_log(LOG_ERROR, "Unable to register channel class 'MGCP'\n"); + return -1; + } + ast_rtp_proto_register(&mgcp_rtp); + ast_cli_register_multiple(cli_mgcp, sizeof(cli_mgcp) / sizeof(struct ast_cli_entry)); + + /* And start the monitor for the first time */ + restart_monitor(); + return res; }