aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 22:25:46 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 22:25:46 +0000
commit4e37275b2fed5c56802e3fc0a0743ca331ecd7ba (patch)
treef3cb60181effe03b9a3af3e09eeac7ef6ef8a96d /channels/chan_iax2.c
parentc5bde913d72b042e6dcc85488c498f73dcc2c771 (diff)
Open a timer before loading configuration so that the trunking configuration option
will take effect. (closes issue #14082) Reported by: seandarcy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164525 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index d05ac3111..98401fbf9 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -12573,14 +12573,15 @@ static int load_module(void)
ast_manager_register( "IAXnetstats", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_netstats, "Show IAX Netstats" );
ast_manager_register( "IAXregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_registry, "Show IAX registrations");
- if(set_config(config, 0) == -1)
- return AST_MODULE_LOAD_DECLINE;
-
timingfd = ast_timer_open();
if (timingfd > -1) {
ast_timer_set_rate(timingfd, trunkfreq);
}
+ if (set_config(config, 0) == -1) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
+
if (ast_channel_register(&iax2_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class %s\n", "IAX2");
__unload_module();