chan_sip: Fix realtime locking inversion when poking a just built peer.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 6 Mar 2015 19:34:35 +0000 (19:34 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 6 Mar 2015 19:34:35 +0000 (19:34 +0000)
commitf1ab2c5e8b77473b76391bbdc2bf5b12f32f0372
tree7434d13c134564f959f1a0b6378067c122734ff5
parent5c3e33b3ca5a726162745c4fb5435d98f737a3b7
chan_sip: Fix realtime locking inversion when poking a just built peer.

When a realtime peer is built it can cause a locking inversion when the
just built peer is poked.  If the CLI command "sip show channels" is
periodically executed then a deadlock can happen because of the locking
inversion.

* Push the peer poke off onto the scheduler thread to avoid the locking
inversion of the just built realtime peer.

AST-1540
ASTERISK-24838 #close
Reported by: Richard Mudgett

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

Merged revisions 432526 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432528 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c