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

andy wang ypwangreg at gmail.com
Sun Dec 24 22:44:20 MST 2006


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


More information about the asterisk-dev mailing list