Review Board 1.7.16


Create function to work around reference leaks caused by shutdown with pending scheduled events

Review Request #4425 - Created Feb. 15, 2015 and submitted

Corey Farrell
11, 13, trunk
ASTERISK-24451
Reviewers
asterisk-dev
Asterisk
When an event is scheduled, it often includes data with a reference bump for the scheduler.  If the scheduler context needs to be destroyed before all events have run, references are leaked.

This change adds a procedure to run all events that were scheduled for a specific callback, but haven't run yet.  chan_iax2 is modified to use this new procedure to run all pending peercnt_remove_cb and replace_callno events.

In the long run I think the scheduler will need to be ao2 aware, but that's not feasible for existing releases.
Ran a bunch of tests that were leaking references: tests/apps/directed_pickup/pickup_chan, tests/callparking, tests/channels/iax2/acl_call, tests/channels/iax2/basic-call, tests/feature_attended_transfer, tests/feature_blonde_transfer

Only tests/callparking still has 1 leaked reference (it was more).
Total:
2
Open:
0
Resolved:
2
Dropped:
0
Status:
From:
Review request changed
Updated (Feb. 18, 2015, 8:25 p.m.)
  • changed from pending to submitted
Committed in revision 431935

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.