[asterisk-dev] [Code Review] astobj2, unlinking everything in bucket instead of stopping on first match when OBJ_MULTIPLE is not used

David Vossel dvossel at digium.com
Fri Feb 5 15:08:37 CST 2010


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

(Updated 2010-02-05 15:08:37.587213)


Review request for Asterisk Developers.


Summary
-------

This is a trunk only problem.  If OBJ_MULTIPLE is not used, all the items in the bucket are unlinked when OBJ_UNLINK is used.

For example.  ao2_find(container, NULL, OBJ_POINTER | OBJ_UNLINK | OBJ_CONTINUE); should return the first found item, unlink it, and stop... Instead of doing that it unlinks everything in the bucket and stops.  This is not good for iax2 as every time a call number is retrieved multiple ones are unlinked never to return.


Diffs (updated)
-----

  /trunk/include/asterisk/astobj2.h 245046 
  /trunk/main/astobj2.c 245046 

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


Testing
-------

resolves the iax2 call number issue described above.


Thanks,

David




More information about the asterisk-dev mailing list