[asterisk-commits] file: trunk r50676 - in /trunk: ./ channels/
configs/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jan 12 20:26:05 MST 2007
Author: file
Date: Fri Jan 12 21:26:04 2007
New Revision: 50676
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50676
Log:
Merge in trunkrealloc option for chan_iax2. (issue #8267 reported by marcodmb, branch by anthonyl)
Modified:
trunk/CHANGES
trunk/channels/chan_iax2.c
trunk/configs/iax.conf.sample
Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=50676&r1=50675&r2=50676
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Fri Jan 12 21:26:04 2007
@@ -60,6 +60,7 @@
what Asterisk should set as the maximum number of open files when it loads.
* Added the jittertargetextra configuration option.
* Added the URI redirect option for the built-in HTTP server
+ * Added the trunkrealloc configuration option to chan_iax2.
SIP changes
-----------
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=50676&r1=50675&r2=50676
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Jan 12 21:26:04 2007
@@ -165,6 +165,7 @@
static int maxjitterinterps=10;
static int jittertargetextra = 40; /* number of milliseconds the new jitter buffer adds on to its size */
static int trunkfreq = 20;
+static int trunkrealloc = 0;
static int authdebug = 1;
static int autokill = 0;
static int iaxcompat = 0;
@@ -3649,7 +3650,7 @@
if (tpeer) {
if (tpeer->trunkdatalen + f->datalen + 4 >= tpeer->trunkdataalloc) {
/* Need to reallocate space */
- if (tpeer->trunkdataalloc < MAX_TRUNKDATA) {
+ if (tpeer->trunkdataalloc < MAX_TRUNKDATA || trunkrealloc) {
if (!(tmp = ast_realloc(tpeer->trunkdata, tpeer->trunkdataalloc + DEFAULT_TRUNKDATA + IAX2_TRUNK_PREFACE))) {
ast_mutex_unlock(&tpeer->lock);
return -1;
@@ -8909,6 +8910,8 @@
maxauthreq = 3;
+ trunkrealloc = 0;
+
v = ast_variable_browse(cfg, "general");
/* Seed initial tos value */
@@ -9050,7 +9053,9 @@
global_max_trunk_mtu = mtuv;
else
ast_log(LOG_NOTICE, "trunkmtu value out of bounds (%d) at line %d\n",
- mtuv, v->lineno);
+ mtuv, v->lineno);
+ } else if (!strcasecmp(v->name, "trunkrealloc")) {
+ trunkrealloc = ast_true(v->value);
} else if (!strcasecmp(v->name, "autokill")) {
if (sscanf(v->value, "%d", &x) == 1) {
if (x >= 0)
Modified: trunk/configs/iax.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/iax.conf.sample?view=diff&rev=50676&r1=50675&r2=50676
==============================================================================
--- trunk/configs/iax.conf.sample (original)
+++ trunk/configs/iax.conf.sample Fri Jan 12 21:26:04 2007
@@ -172,6 +172,10 @@
;
; trunkmtu = 0
;
+
+; Set the below option to yes to have the trunking size grow beyond the normal limit.
+; trunkrealloc=yes
+
; IAX helper threads
; Establishes the number of iax helper threads to handle I/O.
More information about the asterisk-commits
mailing list