]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Add some asserts that were handy when looking for a stasis cache problem.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 4 Apr 2014 17:53:20 +0000 (17:53 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 4 Apr 2014 17:53:20 +0000 (17:53 +0000)
commit3ad7a09002355a6b7fd0ed093eb16ced35c34031
treec218603a35d0901cafbe370dd91f0537b26bd648
parent96426324beda74481d907bb68a2f6666305e50f3
Add some asserts that were handy when looking for a stasis cache problem.

* Assert if a channel is destroyed but has the snapshot staging flag set.
In this case the final channel destruction snapshot would never get taken.

* Assert if what we just got out of the stasis cache is not what we were
looking for.  This assert would have saved several days searching for a
bug and a lot of my hair.

* Assert if the music on hold message posts could not find the associated
channel.  A crash will happen later when manager tries to send the MOH AMI
message.  This assert catches the problem when the stasis message is
posted instead of by the thread processing the defective message.

* Always generate a backtrace when an ast_assert() fails.

Review: https://reviewboard.asterisk.org/r/3411/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c
main/stasis_cache.c
main/utils.c
res/res_musiconhold.c