[Asterisk-code-review] chan_dadhi: Fix setvar in dahdi channels (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Fri Jun 19 09:12:33 CDT 2020
Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14595 )
Change subject: chan_dadhi: Fix setvar in dahdi channels
......................................................................
chan_dadhi: Fix setvar in dahdi channels
The change to how setvar works for various channels performed in
ASTERISK~23756 missed some required change in the dahdi channel,
where the variables are actually set while reading configuration.
This change should fix the issue.
ASTERISK-28955
Change-Id: Ibfeb7f8cbdd735346dc4028de6a265f24f9df274
---
M channels/chan_dahdi.c
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index e885821..8d5d689 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -18140,8 +18140,10 @@
if ((varval = strchr(varname, '='))) {
*varval++ = '\0';
if ((tmpvar = ast_variable_new(varname, varval, ""))) {
- tmpvar->next = confp->chan.vars;
- confp->chan.vars = tmpvar;
+ if (ast_variable_list_replace(&confp->chan.vars, tmpvar)) {
+ tmpvar->next = confp->chan.vars;
+ confp->chan.vars = tmpvar;
+ }
}
}
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14595
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ibfeb7f8cbdd735346dc4028de6a265f24f9df274
Gerrit-Change-Number: 14595
Gerrit-PatchSet: 3
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200619/c1f601f1/attachment.html>
More information about the asterisk-code-review
mailing list