diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-02 01:39:42 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-02 01:39:42 +0000 |
commit | 1b95fc2c1e4190c765c6a27ef962e67660bd7786 (patch) | |
tree | 04fb0a8cd1c7dbd13858e76438fb7ab077b27b40 /channels/chan_skinny.c | |
parent | 4b4369a6c285e62d51b0027734e6ed087c865c1c (diff) |
fix some module loader breakage
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41789 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index fa1e1daea..5011fdb39 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -4196,7 +4196,7 @@ static int reload_config(void) /* We *must* have a config file otherwise stop immediately */ if (!cfg) { ast_log(LOG_NOTICE, "Unable to load config %s, Skinny disabled\n", config); - return 0; + return -1; } memset(&bindaddr, 0, sizeof(bindaddr)); @@ -4331,7 +4331,7 @@ static int reload_config(void) } ast_mutex_unlock(&netlock); ast_config_destroy(cfg); - return 0; + return 1; } static void delete_devices(void) @@ -4391,9 +4391,16 @@ static int load_module(void) } /* load and parse config */ res = reload_config(); - if(!res) { + if (res == -1) { return AST_MODULE_LOAD_DECLINE; } + + /* Make sure we can register our skinny channel type */ + if (ast_channel_register(&skinny_tech)) { + ast_log(LOG_ERROR, "Unable to register channel class 'Skinny'\n"); + return -1; + } + ast_rtp_proto_register(&skinny_rtp); ast_cli_register(&cli_show_devices); ast_cli_register(&cli_show_lines); @@ -4411,14 +4418,6 @@ static int load_module(void) /* And start the monitor for the first time */ restart_monitor(); - /* Announce our presence to Asterisk */ - if (!res) { - /* Make sure we can register our skinny channel type */ - if (ast_channel_register(&skinny_tech)) { - ast_log(LOG_ERROR, "Unable to register channel class 'Skinny'\n"); - return -1; - } - } return res; } |