]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 244505 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 3 Feb 2010 18:40:49 +0000 (18:40 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 3 Feb 2010 18:40:49 +0000 (18:40 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r244505 | tilghman | 2010-02-03 12:34:29 -0600 (Wed, 03 Feb 2010) | 8 lines

  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/branches/1.6.0@244506 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index b4228827bc7417ae1ec254a478dbf1488758f59c..4b6052107299b913201356e9322301f3cdabd1f8 100644 (file)
@@ -9006,7 +9006,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;