From 1bb58646de07501c96c53a963820ef70f73d50c5 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Wed, 13 Aug 2003 15:25:16 +0000 Subject: Totally revamp thread debugging to support locating and removing deadlocks git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1310 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rtp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'rtp.c') diff --git a/rtp.c b/rtp.c index 34b1d48fb..ba40c61bc 100755 --- a/rtp.c +++ b/rtp.c @@ -1136,20 +1136,20 @@ int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, st /* if need DTMF, cant native bridge */ if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) return -2; - ast_pthread_mutex_lock(&c0->lock); - ast_pthread_mutex_lock(&c1->lock); + ast_mutex_lock(&c0->lock); + ast_mutex_lock(&c1->lock); pr0 = get_proto(c0); pr1 = get_proto(c1); if (!pr0) { ast_log(LOG_WARNING, "Can't find native functions for channel '%s'\n", c0->name); - ast_pthread_mutex_unlock(&c0->lock); - ast_pthread_mutex_unlock(&c1->lock); + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); return -1; } if (!pr1) { ast_log(LOG_WARNING, "Can't find native functions for channel '%s'\n", c1->name); - ast_pthread_mutex_unlock(&c0->lock); - ast_pthread_mutex_unlock(&c1->lock); + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); return -1; } pvt0 = c0->pvt->pvt; @@ -1166,8 +1166,8 @@ int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, st vp1 = NULL; if (!p0 || !p1) { /* Somebody doesn't want to play... */ - ast_pthread_mutex_unlock(&c0->lock); - ast_pthread_mutex_unlock(&c1->lock); + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); return -2; } if (pr0->set_rtp_peer(c0, p1, vp1)) @@ -1186,8 +1186,8 @@ int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, st if (vp0) ast_rtp_get_peer(p0, &vac0); } - ast_pthread_mutex_unlock(&c0->lock); - ast_pthread_mutex_unlock(&c1->lock); + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); cs[0] = c0; cs[1] = c1; cs[2] = NULL; -- cgit v1.2.3