mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
Merged revisions 222351 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r222351 | jpeeler | 2009-10-06 15:35:19 -0500 (Tue, 06 Oct 2009) | 9 lines Fix 222298 (crash during destruction of second channel when variable set with setvar). I mistakenly reasoned that setvar would be used on all channels. Since it can be set per channel, give each dahdi channel a copy of the variable. (related to #15899) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@222353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3152,7 +3152,7 @@ static void destroy_dahdi_pvt(struct dahdi_pvt **pvt)
|
||||
ast_smdi_interface_unref(p->smdi_iface);
|
||||
if (p->mwi_event_sub)
|
||||
ast_event_unsubscribe(p->mwi_event_sub);
|
||||
if (p->vars && iflist && !iflist->next) {
|
||||
if (p->vars) {
|
||||
ast_variables_destroy(p->vars);
|
||||
}
|
||||
ast_mutex_destroy(&p->lock);
|
||||
@@ -9178,7 +9178,7 @@ 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 = conf->chan.vars;
|
||||
tmp->vars = ast_variable_new(conf->chan.vars->name, conf->chan.vars->value, "");
|
||||
}
|
||||
tmp->cid_rxgain = conf->chan.cid_rxgain;
|
||||
tmp->rxgain = conf->chan.rxgain;
|
||||
|
||||
Reference in New Issue
Block a user