[asterisk-dev] [Code Review] 2480: Properly initiate device state providers

Russell Bryant reviewboard at asterisk.org
Mon Apr 29 14:09:05 CDT 2013


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


I generally disagree with the approach here.  The approach taken here doesn't solve the fundamental problem at hand.  What about other consumers of these states other than hints?

I actually think that this is a sign of a broken device state provider.  IMO, when a state provider loads, it should emit events to initialize the state for anything that was already listening.  An example of this can be found in load_module() of func_devstate.c.

So, which device state type was observed to be problematic here?

- Russell Bryant


On April 29, 2013, 6:16 p.m., Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2480/
> -----------------------------------------------------------
> 
> (Updated April 29, 2013, 6:16 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-17065
>     https://issues.asterisk.org/jira/browse/ASTERISK-17065
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When the dialplan loads, all hints are initialized to a first state. If a device state provider is not loaded at the time, like meetme (or the new device state provider in chan_sip/Pinana), the hints are not initialized to the initial state. This affects all hints that have an initial state, like a registration in chan_sip, which is a state for "presence" subscriptions using SIMPLE in chan_sip.
> 
> The patch in /svn/asterisk/team/oej/pinana-initialize-devstate-trunk fixes this by re-initializing all hints using the new device state provider after registration of a new device state provider.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/pbx.h 386860 
>   /trunk/main/devicestate.c 386860 
>   /trunk/main/pbx.c 386860 
> 
> Diff: https://reviewboard.asterisk.org/r/2480/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Olle E Johansson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130429/8a468e11/attachment.htm>


More information about the asterisk-dev mailing list