[asterisk-dev] [Code Review] 4425: Create function to work around reference leaks caused by shutdown with pending scheduled events
Corey Farrell
reviewboard at asterisk.org
Sun Feb 15 14:06:26 CST 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4425/
-----------------------------------------------------------
Review request for Asterisk Developers.
Bugs: ASTERISK-24451
https://issues.asterisk.org/jira/browse/ASTERISK-24451
Repository: Asterisk
Description
-------
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.
Diffs
-----
/branches/11/main/sched.c 431733
/branches/11/include/asterisk/sched.h 431733
/branches/11/channels/chan_iax2.c 431733
Diff: https://reviewboard.asterisk.org/r/4425/diff/
Testing
-------
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).
Thanks,
Corey Farrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150215/6fdd011a/attachment.html>
More information about the asterisk-dev
mailing list