[asterisk-dev] [Code Review] 4515: build_peer peer mailbox management bug

gareth reviewboard at asterisk.org
Thu Mar 19 22:02:52 CDT 2015


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

Review request for Asterisk Developers.


Bugs: ASTERISK-24871
    https://issues.asterisk.org/jira/browse/ASTERISK-24871


Repository: Asterisk


Description
-------

During a reload, build_peer iterates over the peer's mailboxes and tags them for removal via the delme variable. It adds any new, unique mailboxes to the peer via add_peer_mailboxes and then removes any mailboxes with delme still set.

However, there isn't any code to unset delme, so this would remove any previously configured mailboxes.

That is not what happens though because build_peer also calls set_peer_defaults which clears out all of the configured mailboxes using clear_peer_mailboxes making the setting of delme redundant.

So in the end there is no impact to the user because all the configured mailboxes get added regardless.

Patch unsets delme for existing, still-configured mailboxes in add_peer_mailboxes and removes call to clear_peer_mailboxes.


Diffs
-----

  /trunk/channels/chan_sip.c 433198 

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


Testing
-------

Added new mailboxes to peer, reloaded chan_sip and verified that existing mailboxes were still there and new mailboxes had been added.

Removed mailboxes from peer, reloaded chan_sip and verified that those mailboxes were no longer assigned to peer.


Thanks,

gareth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150320/3f59bd2d/attachment.html>


More information about the asterisk-dev mailing list