[asterisk-dev] minal bug of mutex init in 1.4.0

Joshua Colp jcolp at digium.com
Mon Dec 25 21:34:01 MST 2006


andy wang wrote:
> Dear Developer,
> 
> In Chan_sip.c::process_sdp()
> 
>     /* Initialize the temporary RTP structures we use to evaluate the
> offer from the peer */
>     newaudiortp = alloca(ast_rtp_alloc_size());
>     memset(newaudiortp, 0, ast_rtp_alloc_size());
>     ast_rtp_pt_clear(newaudiortp);   ====> mutex used without init
> 
>     newvideortp = alloca(ast_rtp_alloc_size());
>     memset(newvideortp, 0, ast_rtp_alloc_size());
>     ast_rtp_pt_clear(newvideortp);   ====> the same as above.
> 
> With DEBUG_THREAD open, in my system, the
> 
> ast_mutex_lock(&rtp->bridge_lock) (which will call
> pthread_mutex_trylock) in the ast_rtp_pt_clear() will return
> EINVAL(22).
> 
> 
> Regards,
> Andy

This has been fixed in 1.4/trunk. Thanks!

-- 
Joshua Colp
Software Developer
Digium, Inc.


More information about the asterisk-dev mailing list