summaryrefslogtreecommitdiff
path: root/udptl.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-04-29 14:50:18 +0000
committerRussell Bryant <russell@russellbryant.com>2006-04-29 14:50:18 +0000
commit8085f4e14b6a3d164079f192cc8016048f419442 (patch)
tree703113f22ff33a2561e7252a7def788ed5714c76 /udptl.c
parent54d6194340c6964e5089dcc92425f695fd8c942d (diff)
a bunch of conversion to ast_channel_*lock (issue #7058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'udptl.c')
-rw-r--r--udptl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/udptl.c b/udptl.c
index 25587d90d..045c89d8f 100644
--- a/udptl.c
+++ b/udptl.c
@@ -996,24 +996,24 @@ int ast_udptl_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
void *pvt1;
int to;
- ast_mutex_lock(&c0->lock);
- while (ast_mutex_trylock(&c1->lock)) {
- ast_mutex_unlock(&c0->lock);
+ ast_channel_lock(c0);
+ while (ast_channel_trylock(c1)) {
+ ast_channel_unlock(c0);
usleep(1);
- ast_mutex_lock(&c0->lock);
+ ast_channel_lock(c0);
}
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_mutex_unlock(&c0->lock);
- ast_mutex_unlock(&c1->lock);
+ ast_channel_unlock(c0);
+ ast_channel_unlock(c1);
return -1;
}
if (!pr1) {
ast_log(LOG_WARNING, "Can't find native functions for channel '%s'\n", c1->name);
- ast_mutex_unlock(&c0->lock);
- ast_mutex_unlock(&c1->lock);
+ ast_channel_unlock(c0);
+ ast_channel_unlock(c1);
return -1;
}
pvt0 = c0->tech_pvt;
@@ -1022,8 +1022,8 @@ int ast_udptl_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
p1 = pr1->get_udptl_info(c1);
if (!p0 || !p1) {
/* Somebody doesn't want to play... */
- ast_mutex_unlock(&c0->lock);
- ast_mutex_unlock(&c1->lock);
+ ast_channel_unlock(c0);
+ ast_channel_unlock(c1);
return -2;
}
if (pr0->set_udptl_peer(c0, p1)) {
@@ -1038,8 +1038,8 @@ int ast_udptl_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
/* Store UDPTL peer */
ast_udptl_get_peer(p0, &ac0);
}
- ast_mutex_unlock(&c0->lock);
- ast_mutex_unlock(&c1->lock);
+ ast_channel_unlock(c0);
+ ast_channel_unlock(c1);
cs[0] = c0;
cs[1] = c1;
cs[2] = NULL;