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

Eric Dantie edantie at gmail.com
Sat Jun 28 16:36:22 CDT 2008


On Fri, 2008-06-27 at 10:24 -0400, Russell Bryant wrote:

> Is the channel locked around this whole section of code?  If not, then  
> the usage of getvar_helper() here is not safe.  You have to copy the  
> result off to another buffer (usually just ast_strdupa) with the  
> channel locked.  Without the channel locked, a result from  
> getvar_helper() can become invalid at any point.
> 

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?

Éric Dantie



More information about the asterisk-dev mailing list