chan_sip: Fix crash involving the bogus peer during sip reload.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 4 Dec 2015 21:36:45 +0000 (15:36 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 7 Dec 2015 16:59:14 +0000 (10:59 -0600)
commit65c8147952b60b1f16e05fb62d5b5f889775d3a6
tree0aa6f11628dad3e28fc9151f5926011891bfd693
parent48c065e46db8c8f9301ee0220229a58c43f958ec
chan_sip: Fix crash involving the bogus peer during sip reload.

A crash happens sometimes when performing a CLI "sip reload".  The bogus
peer gets refreshed while it is in use by a new call which can cause the
crash.

* Protected the global bogus peer object with an ao2 global object
container.

ASTERISK-25610 #close

Change-Id: I5b528c742195681abcf713c6e1011ea65354eeed
channels/chan_sip.c