[asterisk-dev] [Code Review] Lock channels before calling chan->tech->queryoption and setoption
David Vossel
reviewboard at asterisk.org
Thu Jun 16 15:44:32 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1220/#review3736
-----------------------------------------------------------
/branches/1.8/channels/chan_local.c
<https://reviewboard.asterisk.org/r/1220/#comment7486>
The unlock of "ast" needs to happen still to avoid deadlocking when you lock "otherchan"
Remember to lock "ast" again right before exiting the function though.
/branches/1.8/channels/chan_local.c
<https://reviewboard.asterisk.org/r/1220/#comment7484>
Same here. This unlock has to stay. "ast" must be locked again before exiting the function.
- David
On 2011-06-16 15:24:44, Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1220/
> -----------------------------------------------------------
>
> (Updated 2011-06-16 15:24:44)
>
>
> Review request for Asterisk Developers and David Vossel.
>
>
> Summary
> -------
>
> The channel needs to be locked before calling these callback functions. Also, sip_setoption needs to lock the pvt and a check p->rtp is non-null before using it.
>
>
> Diffs
> -----
>
> /branches/1.8/channels/chan_local.c 324047
> /branches/1.8/channels/chan_sip.c 324047
> /branches/1.8/include/asterisk/channel.h 324047
> /branches/1.8/main/channel.c 324047
>
> Diff: https://reviewboard.asterisk.org/r/1220/diff
>
>
> Testing
> -------
>
> Some basic SIP and Local channel calls with Set(CHANNEL(musicclass)=something).
>
>
> Thanks,
>
> Terry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110616/0d5c98d6/attachment.htm>
More information about the asterisk-dev
mailing list