]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pbx.c: Don't remove dashes from hints on reload.
authorSean Bright <sean.bright@gmail.com>
Mon, 8 Nov 2021 15:01:09 +0000 (10:01 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Mon, 8 Nov 2021 15:34:44 +0000 (10:34 -0500)
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

main/pbx.c

index 5e087214773ae34cf3c9a7d19c4452f54171dc6b..46a5a7013b0d154a1f77e41b21fadc63cb20e078 100644 (file)
@@ -7367,7 +7367,14 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
                }
        }
 
-       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);