]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis: Fix dial masquerade datastore lifetime 57/357/1
authorJoshua Colp <jcolp@digium.com>
Mon, 4 May 2015 17:16:24 +0000 (14:16 -0300)
committerJoshua Colp <jcolp@digium.com>
Tue, 5 May 2015 10:34:19 +0000 (07:34 -0300)
commit181ae3b8d929bd798a98b584868d1eac85b2eee9
treeb31aa6df1e9cc58fb2e873e0084f4fbcee42004f
parent626bffc4c2833407540cd8f6024bcb4f672c4a2c
stasis: Fix dial masquerade datastore lifetime

A recent change went into Asterisk which added reference counts to the
channels stored in a dial masquerade datastore. Unfortunately this
included a reference to the caller in a dialing operation. While all
of the dialed targets have the datastore removed from them upon dialing
completion this did not occur for the caller, causing it to have a
reference to itself that could go never go away (as it depended on
the destruction of the datastore which only happened when the channel
was destroyed). This resulted in the caller channel remaining on the
system despite it having hung up.

This change does the following to fix this issue:

1. The dial masquerade datastore is now removed from the caller upon
dialing completion, just like the dialed targets.
2. Upon destruction of the caller all the dialed targets are also
removed from the dial masquerade datastore (just in case).
3. The reference to the caller has been removed as it should not be
possible for the datastore to now be valid/useful after the lifetime
of the caller has ended.

ASTERISK-25025 #close

Change-Id: I1ef4ca5ca04980028604cc2af5d2992ac3431b3f
main/stasis_channels.c