From 6a4d64e3efa12ea468993aac9388d06c167e7b37 Mon Sep 17 00:00:00 2001 From: rizzo Date: Thu, 15 Nov 2007 16:20:47 +0000 Subject: access channel locks through ast_channel_lock/unlock/trylock and not through ast_mutex primitives. To detect all occurrences, I have renamed the lock field in struct ast_channel so it is clear that it shouldn't be used directly. There are some uses in res/res_features.c (see details of the diff) that are error prone as they try and lock two channels without caring about the order (or without explaining why it is safe). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89293 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_softhangup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/app_softhangup.c') diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c index b4e0ccc5f..ee6c92a05 100644 --- a/apps/app_softhangup.c +++ b/apps/app_softhangup.c @@ -104,11 +104,11 @@ static int softhangup_exec(struct ast_channel *chan, void *data) ast_log(LOG_WARNING, "Soft hanging %s up.\n", c->name); ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT); if (!ast_test_flag(&flags, OPTION_ALL)) { - ast_mutex_unlock(&c->lock); + ast_channel_unlock(c); break; } } - ast_mutex_unlock(&c->lock); + ast_channel_unlock(c); } return 0; -- cgit v1.2.3