]> 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:01:33 +0000 (16:01 -0500)
commitbd69639a6b10e39848d6edd2a19c77f25800ef9b
tree297bf2155302ab841238139eaa8800bd9336b070
parentdd704bbba516779bf671290789041b3de30b7fbe
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