]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 288157 via svnmerge from
authorPaul Belanger <paul.belanger@polybeacon.com>
Tue, 21 Sep 2010 22:28:21 +0000 (22:28 +0000)
committerPaul Belanger <paul.belanger@polybeacon.com>
Tue, 21 Sep 2010 22:28:21 +0000 (22:28 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288157 | pabelanger | 2010-09-21 18:26:15 -0400 (Tue, 21 Sep 2010) | 15 lines

  Merged revisions 288147 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ........
    r288147 | pabelanger | 2010-09-21 18:22:43 -0400 (Tue, 21 Sep 2010) | 9 lines

    Setup timer before set_config().

    (closes issue #18019)
    Reported by: Netview
    Patches:
          issue_0018019.patch uploaded by pabelanger (license 224)
    Tested by: Netview
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288158 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 9e6d4c6a5417aed0bc174c3af3606729e14cc06c..8c2cf54441586258f9c90b05a553d076d43ad578 100644 (file)
@@ -14553,6 +14553,10 @@ static int load_module(void)
        iax_set_output(iax_debug_output);
        iax_set_error(iax_error_output);
        jb_setoutput(jb_error_output, jb_warning_output, NULL);
+       
+       if ((timer = ast_timer_open())) {
+               ast_timer_set_rate(timer, trunkfreq);
+       }
 
        if (set_config(config, 0) == -1) {
                if (timer) {
@@ -14580,10 +14584,6 @@ static int load_module(void)
        ast_manager_register_xml("IAXnetstats", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_netstats);
        ast_manager_register_xml("IAXregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_registry);
 
-       if ((timer = ast_timer_open())) {
-               ast_timer_set_rate(timer, trunkfreq);
-       }
-
        if (ast_channel_register(&iax2_tech)) {
                ast_log(LOG_ERROR, "Unable to register channel class %s\n", "IAX2");
                __unload_module();