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

George Joseph asteriskteam at digium.com
Mon Nov 8 13:13:21 CST 2021


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/16696 )

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(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



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/+/16696
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I95e48f5a268efa3c6840ab69798525d3dce91636
Gerrit-Change-Number: 16696
Gerrit-PatchSet: 2
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211108/c3deaa7a/attachment.html>


More information about the asterisk-code-review mailing list