|Summary:||ASTERISK-18844: Extension state callback needs to happen when callback is removed.|
|Reporter:||Richard Mudgett (rmudgett)||Labels:|
|Date Opened:||2011-11-09 16:20:34.000-0600||Date Closed:||2011-12-22 20:19:39.000-0600|
|Environment:||Attachments:||( 0) jira_asterisk_18740_v1.8.patch|
|Description:||Chan_sip gives a dialog reference to the extension state callback and assumes that when ast_extension_state_del() returns, the callback cannot happen anymore. Chan_sip then reduces the dialog reference count associated with the callback. Recent changes (ASTERISK-17760) have resulted in the potential for the callback to happen after ast_extension_state_del() has returned. For chan_sip, this could be very bad because the dialog pointer could have already been destroyed.|
An extension state callback needs to happen when the callback is removed to indicate that the callback is successfully removed. Chan_sip can then clean up any resources allocated for the callback.
|Comments:||By: Richard Mudgett (rmudgett) 2011-11-09 16:24:12.361-0600|
ASTERISK-18740 identified a potential related problem to ASTERISK-17760 that [^jira_asterisk_18740_v1.8.patch] attempts to fix.
By: Richard Mudgett (rmudgett) 2011-11-09 16:44:37.888-0600
The destructor for the ao2 object holding the callback could do the callback removed callback.
By: Richard Mudgett (rmudgett) 2011-12-20 16:01:23.537-0600
[^jira_asterisk_18740_v1.8.patch] incorporated into the patch on reviewboard: