[asterisk-dev] [Code Review] app_queue: Makes call_queue objects ao2 objects so ref counting can be done

David Vossel dvossel at digium.com
Thu Nov 12 15:56:40 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/427/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

In app_queue, it is possible for a call_queue to be destroyed while another object still holds a pointer to it.  This patch converts call_queue objects to ao2 objects allowing them to be ref counted.  This makes it safe for the queue_ent object in queue_exec() to reference it's parent call_queue even after it has left the queue.


This addresses bug 15686.
    https://issues.asterisk.org/view.php?id=15686


Diffs
-----

  /branches/1.4/apps/app_queue.c 229742 

Diff: https://reviewboard.asterisk.org/r/427/diff


Testing
-------

I developed a situation in which a call_queue would be destroyed after the queue_ent left the queue, but while the queue_ent would still attempt to access it's parent call_queue to do an update_queue() on hangup... This originally caused a horrible crash because the call_queue was already freed.  Now it exits correctly destroying the call_queue right before queue_exec() exits.


Thanks,

David




More information about the asterisk-dev mailing list