]> 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)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 29 Mar 2022 21:02:08 +0000 (16:02 -0500)
commit8442c832295f16f03e7822c2580fe9a86cb64719
tree3e2d1ea126791e77326611cbca9ef2c4e0b9aeca
parent4abd75b1d4b5bb74ea8a3a505819c044b76893b4
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