Summary:ASTERISK-03271: [patch] Centralize all iax2 peer lookups to the find_peer() function
Reporter:Rob Gagnon (rgagnon)Labels:
Date Opened:2005-01-14 09:51:18.000-0600Date Closed:2008-01-15 15:21:46.000-0600
Versions:Frequency of
Environment:Attachments:( 0) chan_iax2.c.patch.txt
( 1) chan_iax2.c.patch2.txt
Description:- removes an unneeded  "prev" variable from the find_peer() function

- replaces 4 instances of manual locking and looping of the peer list with a call to the find_peer() function


Disclaimer on file

PLEASE double check I didn't deadlock anything with this change
Comments:By: Rob Gagnon (rgagnon) 2005-01-14 16:32:47.000-0600

- fixed a possible deadlock, and a memory leak (not introduced by first patch) in iax2_show_peer()
 - find_peer() was called after locking the peerl.lock even though find_peer() will want to lock it as well
 - added code to the function to free memory used by peer returned in find_peer() if needed

Newest patch file is chan_iax2.c.patch2.txt against CVS v1.237

By: Mark Spencer (markster) 2005-01-15 01:24:43.000-0600

Fixed in CVS with minor mods.  Thanks!

By: Russell Bryant (russell) 2005-01-16 19:35:39.000-0600

not in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:21:46.000-0600

Repository: asterisk
Revision: 4797

U   trunk/channels/chan_iax2.c

r4797 | markster | 2008-01-15 15:21:46 -0600 (Tue, 15 Jan 2008) | 2 lines

Simplify find_peer usage (bug ASTERISK-3271)