[Asterisk-code-review] res_ael: Create consistent label names across reloads (...asterisk[13])
Sean Bright
asteriskteam at digium.com
Thu Apr 11 15:53:33 CDT 2019
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11270
Change subject: res_ael: Create consistent label names across reloads
......................................................................
res_ael: Create consistent label names across reloads
Reset the internal counter that the AEL2 compiler uses for unique label
names before compiling. This keeps dialplan labels consistent across
reloads assuming the AEL2 has not changed.
ASTERISK-17799 #close
Reported by: Kirill Katsnelson
Change-Id: I30b3cc887d1ee0644d3f341e2fef16f525d7fae5
---
M res/ael/pval.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/70/11270/1
diff --git a/res/ael/pval.c b/res/ael/pval.c
index bbfeb2d..02b364d 100644
--- a/res/ael/pval.c
+++ b/res/ael/pval.c
@@ -2925,7 +2925,7 @@
/* "CODE" GENERATOR -- Convert the AEL representation to asterisk extension language */
/* =============================================================================================== */
-static int control_statement_count = 0;
+static int control_statement_count;
struct ael_priority *new_prio(void)
{
@@ -4428,6 +4428,9 @@
struct ael_extension *exten;
struct ael_extension *exten_list = 0;
+ /* Reset the counter so that we get consistent labels between reloads */
+ control_statement_count = 0;
+
for (p=root; p; p=p->next ) { /* do the globals first, so they'll be there
when we try to eval them */
switch (p->type) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11270
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I30b3cc887d1ee0644d3f341e2fef16f525d7fae5
Gerrit-Change-Number: 11270
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190411/f9c1a33d/attachment.html>
More information about the asterisk-code-review
mailing list