diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-15 16:20:47 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-15 16:20:47 +0000 |
commit | 6a4d64e3efa12ea468993aac9388d06c167e7b37 (patch) | |
tree | 893184ac838560b42d47dd3e9c413812c920645b /include/asterisk/channel.h | |
parent | f8295541144551635f59cd789a768764e2266591 (diff) |
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
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 15af0c722..327096d55 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -421,7 +421,7 @@ struct ast_channel { directly, use ast_softhangup() */ time_t whentohangup; /*!< Non-zero, set to actual time when channel is to be hung up */ pthread_t blocker; /*!< If anyone is blocking, this is them */ - ast_mutex_t lock; /*!< Lock, can be used to lock a channel for some operations - see ast_channel_lock() */ + ast_mutex_t lock_dont_use; /*!< Lock, can be used to lock a channel for some operations - see ast_channel_lock() */ const char *blockproc; /*!< Procedure causing blocking */ const char *appl; /*!< Current application */ |