[Asterisk-code-review] pbx.c: Don't remove dashes from hints on reload. (asterisk[19])

Benjamin Keith Ford asteriskteam at digium.com
Mon Nov 8 09:32:35 CST 2021


Benjamin Keith Ford has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16695 )


Change subject: pbx.c: Don't remove dashes from hints on reload.
......................................................................

pbx.c: Don't remove dashes from hints on reload.

When reloading dialplan, hints created dynamically would lose any dash
characters. Now we ignore those dashes if we are dealing with a hint
during a reload.

ASTERISK-28040 #close

Change-Id: I95e48f5a268efa3c6840ab69798525d3dce91636
---
M main/pbx.c
1 file changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/95/16695/1

diff --git a/main/pbx.c b/main/pbx.c
index d0ee127..0cae9b8 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7380,7 +7380,14 @@
 		}
 	}
 
-	exten_fluff = ext_fluff_count(extension);
+	if (priority == PRIORITY_HINT) {
+		/* Fluff in a hint is fine. This prevents the removal of dashes from dynamically
+		 * created hints during a reload. */
+		exten_fluff = 0;
+	} else {
+		exten_fluff = ext_fluff_count(extension);
+	}
+
 	callerid_fluff = callerid ? ext_fluff_count(callerid) : 0;
 
 	length = sizeof(struct ast_exten);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16695
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: I95e48f5a268efa3c6840ab69798525d3dce91636
Gerrit-Change-Number: 16695
Gerrit-PatchSet: 1
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211108/5a525b40/attachment.html>


More information about the asterisk-code-review mailing list