[asterisk-dev] [Code Review] build_peer doesnt unlink a peer object from peers_by_ip container which leads to a wrong refcounter value

schmidts reviewboard at asterisk.org
Mon Sep 12 04:09:08 CDT 2011


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

Review request for Asterisk Developers.


Summary
-------

after sip reload every peer was relinked to the peers_by_ip container and the refcounter of each object was increased. after debugging i have found that the ao2_find in build_peer unlinks the peer from the peers container but not from the peers_by_ip container which leads to a wrong refcounter value so the old peer object wasnt destroyed.

by adding a ao2_unlink from the peers_by_ip container the refcounter is ok and the old peer object is removed.


Diffs
-----

  branches/1.8/channels/chan_sip.c 335252 

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


Testing
-------

several sip reloads with 4000 peers, refcounter, refdebug and sip show objects looks fine.


Thanks,

schmidts

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110912/5e138ea4/attachment.htm>


More information about the asterisk-dev mailing list