]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make trunkfreq take effect when set
authorKinsey Moore <kmoore@digium.com>
Thu, 12 Apr 2012 16:18:22 +0000 (16:18 +0000)
committerKinsey Moore <kmoore@digium.com>
Thu, 12 Apr 2012 16:18:22 +0000 (16:18 +0000)
Previously, setting trunkfreq had no effect on initial load or on reload and
only ever used the default value.  This causes trunkfreq to be used
appropriately on initial load and reload.

(closes issue ASTERISK-19521)
Patch-by: Jaco Kroon
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361972 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 2d2d91c0bf05fa0d221020e951af496964cddf3a..20b3b534e4f1fdaa0d91585255b07a8829786762 100644 (file)
@@ -13244,6 +13244,9 @@ static int set_config(const char *config_file, int reload)
                                ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 1000ms instead.\n");
                                trunkfreq = 1000;
                        }
+                       if (timer) {
+                               ast_timer_set_rate(timer, 1000 / trunkfreq);
+                       }
                } else if (!strcasecmp(v->name, "trunkmtu")) {
                        mtuv = atoi(v->value);
                        if (mtuv  == 0 )