]> git.ipfire.org Git - thirdparty/asterisk.git/commit
cli: Prevent assertions on startup from bad ao2 refs.
authorNaveen Albert <asterisk@phreaknet.org>
Tue, 3 May 2022 12:53:28 +0000 (12:53 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Sat, 10 Sep 2022 01:41:46 +0000 (20:41 -0500)
commitc7612521be34e912b208de406255c4b2967947a0
tree864a7b034bbdad5e33721f688b8394b09bcdc975
parenta0713a9f703c94acdaf83810440c8200a6b84cfb
cli: Prevent assertions on startup from bad ao2 refs.

If "core show channels" is run before startup has completed, it
is possible for bad ao2 refs to occur because the system is not
yet fully initialized. This will lead to an assertion failing.

To prevent this, initialization of CLI builtins is moved to be
later along in the main load sequence. Core CLI commands are
loaded at the same time, but channel-related commands are loaded
later on.

ASTERISK-29846 #close

Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6
include/asterisk/_private.h
main/asterisk.c
main/cli.c