Review Board 1.7.16

IAX2 prune realtime fix

Review Request #176 - Created Feb. 25, 2009 and submitted

David Vossel
Iax2 prune realtime had issues.  If "iax2 prune realtime all" was called, it would appear like the command was successful, but in reality nothing happened.  This is because the reload that was supposed to take place checks the config files, sees no changes, and does nothing.  If there had been a change in the the config file, the realtime users would have been marked for deletion and everything would have been fine.  Now prune_users() and prune_peers() are called instead of reload_config() to prune all users/peers that are realtime.  These functions remove all users/peers with the rtfriend and delme flags set. 

iax2_prune_realtime() also lacked the code to properly delete a single friend.  For example. if iax2 prune realtime <friend> was called, only the peer instance would be removed. The user would still remain.  

Ship it!
Posted (Feb. 26, 2009, 3:38 a.m.)
Aside from one minor optimization, this looks good.

As we discussed, this should be fixed in 1.4, but the patch will be smaller.  I would be happy to take a look at your 1.4 version if you'd like, but I'm pretty sure you know what needs to be done there.

Nice work!
/trunk/channels/chan_iax2.c (Diff revision 1)
You just avoid the user variable and return ao2_find() directly runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to