[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
Wed Feb 18 19:59:22 CST 2015

This is an automatically generated e-mail. To reply, visit:

(Updated Feb. 18, 2015, 7:59 p.m.)


This change has been marked as submitted.

Review request for Asterisk Developers.


Committed in revision 431916

Bugs: ASTERISK-24451

Repository: 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.


  /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/


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).


Corey Farrell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150219/a53e7a00/attachment-0001.html>

More information about the asterisk-dev mailing list