]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't allow trunkfreq to be greater than 1000ms.
authorSean Bright <sean@malleable.com>
Fri, 17 Feb 2012 22:03:04 +0000 (22:03 +0000)
committerSean Bright <sean@malleable.com>
Fri, 17 Feb 2012 22:03:04 +0000 (22:03 +0000)
........

Merged revisions 355793 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

channels/chan_iax2.c
configs/iax.conf.sample

index 3a8f4f4b760673fc79cfe645ecf4314a42a7aeae..91e5830b27bb524002ad3928f4d5372834d735e1 100644 (file)
@@ -13349,8 +13349,13 @@ static int set_config(const char *config_file, int reload)
                        ast_set2_flag64((&globalflags), i || ast_true(v->value), IAX_RTAUTOCLEAR);
                } else if (!strcasecmp(v->name, "trunkfreq")) {
                        trunkfreq = atoi(v->value);
-                       if (trunkfreq < 10)
+                       if (trunkfreq < 10) {
+                               ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 10ms instead.\n");
                                trunkfreq = 10;
+                       } else if (trunkfreq > 1000) {
+                               ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 1000ms instead.\n");
+                               trunkfreq = 1000;
+                       }
                } else if (!strcasecmp(v->name, "trunkmtu")) {
                        mtuv = atoi(v->value);
                        if (mtuv  == 0 )
index 35b8d7744ca2c36c42e66c7ff44c5ac7e74dd0f6..be507501a8b981a146fbe9a82b906de73072ed13 100644 (file)
@@ -189,7 +189,8 @@ forcejitterbuffer=no
 ; increasing the time between sending trunk messages, the trunk's payload size will increase as
 ; well.  Note, depending on the size set by trunkmtu, messages may be sent more often than
 ; specified.  For example if a trunk's message size grows to the trunkmtu size before 20ms is
-; reached that message will be sent immediately.
+; reached that message will be sent immediately.  Acceptable values are between 10ms and
+; 1000ms.
 ;
 ; trunkfreq=20     ; How frequently to send trunk msgs (in ms). This is 20ms by default.