[asterisk-dev] [Code Review] ast_pickup_call() refactor to create a common core function ast_do_pickup()

Russell Bryant reviewboard at asterisk.org
Thu May 5 14:43:53 CDT 2011


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



trunk/include/asterisk/features.h
<https://reviewboard.asterisk.org/r/1185/#comment7142>

    It would be good to document what this function assumes about channel locks.  i.e., which channel locks does it assume are held or not held when entering this function?



trunk/main/features.c
<https://reviewboard.asterisk.org/r/1185/#comment7144>

    I'm not sure why this is required.  Why not just block on lock() and then check to see if the channel is a zombie / has been hung up when you get it?


- Russell


On 2011-05-04 05:24:29, Alec Davis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1185/
> -----------------------------------------------------------
> 
> (Updated 2011-05-04 05:24:29)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> debugging mantis 18654, found common code, of which 1 set was wrong, the ast_pickup_call() code in features.c
> The actual fault was ast_pickup_call where the target chan was unlocked too early - see bug18654.diff2.txt
> 
> Moved app_directed:pickup_do() to features:ast_do_pickup().
> 
> Now functions below all now use the new ast_do_pickup()
> app_directed_pickup.c:
>    pickup_by_channel()
>    pickup_by_exten()
>    pickup_by_mark()
>    pickup_by_part()
> features.c:
>    ast_pickup_call() 
> 
> 
> This addresses bug 18654.
>     https://issues.asterisk.org/view.php?id=18654
> 
> 
> Diffs
> -----
> 
>   trunk/apps/app_directed_pickup.c 316615 
>   trunk/channels/chan_sip.c 316615 
>   trunk/include/asterisk/features.h 316615 
>   trunk/main/features.c 316615 
>   trunk/res/res_features.exports.in 316615 
> 
> Diff: https://reviewboard.asterisk.org/r/1185/diff
> 
> 
> Testing
> -------
> 
> pickup using *8 feature code, with pickup sounds enabled/disabled
> 
> exten => 71,1,Pickup()           ; any ringing extension in same pickupgroup 
> exten => 72,1,Pickup(85 at phones)  ; dahdi extension
> exten => 73,1,Pickup(823 at phones) ; sip extension
> 
> 
> Thanks,
> 
> Alec
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110505/a353b446/attachment-0001.htm>


More information about the asterisk-dev mailing list