[asterisk-dev] mmichelson: trunk r125649 - /trunk/apps/app_queue.c

Russell Bryant russell at digium.com
Sat Jun 28 16:57:28 CDT 2008


On Jun 28, 2008, at 4:36 PM, Eric Dantie wrote:
> As I see in
> http://www.asterisk.org/doxygen/1.4/pbx_8c.html#2a832efa9e38c1caef22f21336f16ea1
>
> pbx_builtin_getvar_helper() is already locking the channel, why does  
> it
> need to be locked before calling the function?


You're right.  I was the one that added that.  However, I later  
realized the channel actually needs to be locked outside of the call  
to getvar_helper().

The issue is that if the channel isn't locked, you can not safely read  
the result from the function.  The locking inside of it can be removed.

--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.







More information about the asterisk-dev mailing list