summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-02-03 18:34:29 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-02-03 18:34:29 +0000
commitd3ae6952040e5e21c5de611ce10fe764e0bcecfa (patch)
tree300494adbaef67d4574d25b59f209ba9ae964766 /channels
parent36bbf8f902fdede0c3ad8a4507313773872a0dd8 (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 59e097d42..890fc6839 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;