mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
use the channel lock wrappers (issue #7120, Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -40,15 +40,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/stringfields.h"
|
||||
#define locked_copy_string(chan, dest, source, len) \
|
||||
do { \
|
||||
ast_mutex_lock(&chan->lock); \
|
||||
ast_channel_lock(chan); \
|
||||
ast_copy_string(dest, source, len); \
|
||||
ast_mutex_unlock(&chan->lock); \
|
||||
ast_channel_unlock(chan); \
|
||||
} while (0)
|
||||
#define locked_string_field_set(chan, field, source) \
|
||||
do { \
|
||||
ast_mutex_lock(&chan->lock); \
|
||||
ast_channel_lock(chan); \
|
||||
ast_string_field_set(chan, field, source); \
|
||||
ast_mutex_unlock(&chan->lock); \
|
||||
ast_channel_unlock(chan); \
|
||||
} while (0)
|
||||
|
||||
static int func_channel_read(struct ast_channel *chan, char *function,
|
||||
|
Reference in New Issue
Block a user