mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-08 22:27:07 +00:00
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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user