[Home]

Summary:ASTERISK-05392: [patch] update_registry does things in the wrong order.
Reporter:Steve Davies . (stevedavies)Labels:
Date Opened:2005-10-29 06:43:01Date Closed:2008-01-15 15:52:43.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-iax2fixes-devicestate.patch
Description:Hi,

Two little issues in chan_iax2.c::update_registry:

First is that the new peer IP address was only put into the peer struct AFTER register_peer_exten and ast_device_state_changed were called.  I believe this creates a little race where the peer can be called or otherwise queried before the new IP address is properly updated into the peer struct.

The second change is to only do the ast_device_state_changed after we've created the peer exten.  My reasoning is that the ast_device_state_changed could result in who knows what callback being called, which might even attempt to call this peer.  So lets have the environment properly setup before triggering that callback.

I confess that some misbehaviour in my testing lead me to examine this code, but I can't remember any more exactly what the bug was - so I've loaded this as a "tweak".

Steve


****** ADDITIONAL INFORMATION ******

disclaimer in the Digium secure vault (in Mark's drawer?)

Comments:By: Mark Spencer (markster) 2005-10-29 12:31:32

Fixed in CVS head, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:52:43.000-0600

Repository: asterisk
Revision: 6889

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r6889 | markster | 2008-01-15 15:52:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix minor iax2 device state issue (bug ASTERISK-5392)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6889