]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Restrict CLI/AMI commands on shutdown. 72/2372/6
authorMark Michelson <mmichelson@digium.com>
Thu, 10 Mar 2016 22:58:49 +0000 (16:58 -0600)
committerMark Michelson <mmichelson@digium.com>
Thu, 24 Mar 2016 14:29:07 +0000 (09:29 -0500)
commit59c8e189fddcbc861947143f48e5b86e4707b29a
tree2d2ff9f7eec303cd4d65d78a807b640cf757c6ea
parented34bbdf9becaa61fa2ae544605426b6c6bbbb0f
Restrict CLI/AMI commands on shutdown.

During stress testing, we have frequently seen crashes occur because a
CLI or AMI command attempts to access information that is in the process
of being destroyed.

When addressing how to fix this issue, we initially considered fixing
individual crashes we observed. However, the changes required to fix
those problems would introduce considerable overhead to the nominal
case. This is not reasonable in order to prevent a crash from occurring
while Asterisk is already shutting down.

Instead, this change makes it so AMI and CLI commands cannot be executed
if Asterisk is being shut down. For AMI, this is absolute. For CLI,
though, certain commands can be registered so that they may be run
during Asterisk shutdown.

ASTERISK-25825 #close

Change-Id: I8887e215ac352fadf7f4c1e082da9089b1421990
include/asterisk/cli.h
main/asterisk.c
main/cli.c
main/manager.c
main/utils.c