]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx.c: Warn if there are too many includes in a context.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 5 Mar 2022 16:26:42 +0000 (16:26 +0000)
committerKevin Harwell <kharwell@digium.com>
Tue, 29 Mar 2022 21:06:06 +0000 (16:06 -0500)
commita7cf3979ece70a4f0e5efec3a4be5b6fa417a517
tree7fb92ed7dc8495308806519e1f49f455b38f2f59
parent3e97156fd37c3a6a298771ffcb080ec67d248f80
pbx.c: Warn if there are too many includes in a context.

The PBX core uses the stack when it comes to includes, which
means that a context can only contain strictly fewer than
AST_PBX_MAX_STACK includes. If this is exceeded, then warnings
will be emitted for each number of includes beyond this if
searching for an extension in the including context, and if
the extension's inclusion is beyond the stack size, it will
simply not be found.

To address this, we now check if there are too many includes
in a context when the dialplan is reloaded so that if there
is an issue, the user is aware of at "compile time" as opposed
to "run time" only. Secondly, more details are printed out
when this message is encountered so it's clear what has happened.

ASTERISK-26719

Change-Id: Ia3700452e75a7af3391b3e82ee69f06a669f8958
main/pbx.c