dect
/
asterisk
Archived
13
0
Fork 0

remove a check of the result of ast_mutex_lock

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25891 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2006-05-09 07:28:01 +00:00
parent 8b63a317f7
commit bccc6a110e
1 changed files with 7 additions and 14 deletions

View File

@ -50,22 +50,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
AST_MUTEX_DEFINE_STATIC(monitorlock);
#define LOCK_IF_NEEDED(lock, needed) \
do { \
if (needed) { \
if (ast_mutex_lock(lock)) { \
ast_log(LOG_WARNING, "Unable to lock channel\n"); \
return -1; \
} \
} \
#define LOCK_IF_NEEDED(lock, needed) do { \
if (needed) \
ast_mutex_lock(lock); \
} while(0)
#define UNLOCK_IF_NEEDED(lock, needed) \
do { \
if (needed) { \
ast_mutex_unlock(lock); \
} \
} while(0) \
#define UNLOCK_IF_NEEDED(lock, needed) do { \
if (needed) \
ast_mutex_unlock(lock); \
} while (0)
static unsigned long seq = 0;