[asterisk-dev] [Code Review] IAX2 prune realtime fix

Russell Bryant russell at digium.com
Thu Feb 26 09:38:14 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/176/#review489
-----------------------------------------------------------

Ship it!


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
<http://reviewboard.digium.com/r/176/#comment1149>

    You just avoid the user variable and return ao2_find() directly


- Russell


On 2009-02-25 17:57:30, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/176/
> -----------------------------------------------------------
> 
> (Updated 2009-02-25 17:57:30)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> 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.  
> 
> 
> This addresses bug 0014479.
>     http://bugs.digium.com/view.php?id=0014479
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 178639 
> 
> Diff: http://reviewboard.digium.com/r/176/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list