]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis: Fix dial masquerade datastore lifetime 59/359/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:38:56 +0000 (05:38 -0500)
commit7c687c8e546ef1c66afd2f513a487fb92ffb5ac6
treedc491c88e988fa200aad702890c5082f2086318a
parent0602409c898782bb4cad29c9978738d9401798cc
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