From: Tilghman Lesher Date: Wed, 3 Feb 2010 18:34:29 +0000 (+0000) Subject: The chanvar= setting should inherit the entire list of variables, not just the first... X-Git-Tag: 11.0.0-beta1~3499 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3ae6952040e5e21c5de611ce10fe764e0bcecfa;p=thirdparty%2Fasterisk.git The chanvar= setting should inherit the entire list of variables, not just the first one. (closes issue #16359) Reported by: raarts Patches: dahdi-setvars.diff uploaded by raarts (license 937) Tested by: raarts git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244505 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 59e097d424..890fc68395 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11623,7 +11623,13 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf, tmp->callgroup = conf->chan.callgroup; tmp->pickupgroup= conf->chan.pickupgroup; if (conf->chan.vars) { - tmp->vars = ast_variable_new(conf->chan.vars->name, conf->chan.vars->value, ""); + struct ast_variable *v, *tmpvar; + for (v = conf->chan.vars ; v ; v = v->next) { + if ((tmpvar = ast_variable_new(v->name, v->value, v->file))) { + tmpvar->next = tmp->vars; + tmp->vars = tmpvar; + } + } } tmp->cid_rxgain = conf->chan.cid_rxgain; tmp->rxgain = conf->chan.rxgain;