[asterisk-dev] [Code Review]: app_queue change to have one devstate per device not per member / Janitorial cleanups
irroot
reviewboard at asterisk.org
Wed Oct 26 08:18:12 CDT 2011
> On Oct. 25, 2011, 11:27 a.m., jrose wrote:
> > /trunk/apps/app_queue.c, line 1431
> > <https://reviewboard.asterisk.org/r/1538/diff/3/?file=21392#file21392line1431>
> >
> > I'm not sure if this is a problem or not, is it safe to assume at this point that every member this loop iterates through will have a non-null device?
Yes it is now safe there was one case where it could sneak past the bit bellow is when a member is created and no device state assigned the member is removed.
there was the ability to change the state_interface in the RT backend where it will be reassigned if this fails the member is marked for execution now.
> On Oct. 25, 2011, 11:27 a.m., jrose wrote:
> > /trunk/apps/app_queue.c, lines 1753-1758
> > <https://reviewboard.asterisk.org/r/1538/diff/3/?file=21392#file21392line1753>
> >
> > I'm guessing that if a new member can't get a device here that this is going to deref the member to zero and destroy it. So I'm assuming for the moment that the assumption is safe.
indeed < 10 lines up the member "cur" is allocated this dref will send it to the big bit bucket in the sky.
- irroot
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1538/#review4577
-----------------------------------------------------------
On Oct. 25, 2011, 7:55 a.m., irroot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1538/
> -----------------------------------------------------------
>
> (Updated Oct. 25, 2011, 7:55 a.m.)
>
>
> Review request for Asterisk Developers and Matthew Nicholson.
>
>
> Summary
> -------
>
> This is a rather large changeset but consists of the following
>
> 1)remove the taskprocessor it was used to process the state changes and this is perhaps not that efficient
> 2)remove check_state_unknown its not needed any more now that we can reserve a state interface
> 3)split state information into a new container (devices) the member holds a ref to it allowing shared state devices see above
> 4)realtime and paused are y/n so add a :1 to them and align bitfields in struct
>
> 5)ao2 search callbacks can handle non OBJ_POINTER flag to make ao2_find useful no need to pass obj
> 6)Reservation of devices to pervent duplicate calls
>
>
> This addresses bug AST-695.
> https://issues.asterisk.org/jira/browse/AST-695
>
>
> Diffs
> -----
>
> /trunk/apps/app_queue.c 342273
>
> Diff: https://reviewboard.asterisk.org/r/1538/diff
>
>
> Testing
> -------
>
> as most of the above [1,2,4] are removing code not referenced or changing syntax going over the .diff over and over makeing sure it builds and loads.
>
> check state information is propogated and used in app_queue [3,6]
> make sure queues are loaded correctly and changes in [5] have not broken things
>
>
> Thanks,
>
> irroot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111026/f9162641/attachment.htm>
More information about the asterisk-dev
mailing list