access channel locks through ast_channel_lock/unlock/trylock and not
authorLuigi Rizzo <rizzo@icir.org>
Thu, 15 Nov 2007 16:20:47 +0000 (16:20 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Thu, 15 Nov 2007 16:20:47 +0000 (16:20 +0000)
commit09d9cce1d8df6e181b60cd00fb1708ebe012069d
tree893184ac838560b42d47dd3e9c413812c920645b
parent139978dbb7388060c3d24fdd3a356744170c1ef8
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: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_channelredirect.c
apps/app_senddtmf.c
apps/app_softhangup.c
include/asterisk/channel.h
include/asterisk/lock.h
main/channel.c
main/manager.c
res/res_features.c