diff options
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 22a08120c..55596b147 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1375,15 +1375,16 @@ static inline int ast_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, #define CRASH do { } while(0) #endif -#define CHECK_BLOCKING(c) { \ - if (ast_test_flag(c, AST_FLAG_BLOCKING)) {\ - ast_log(LOG_WARNING, "Thread %ld Blocking '%s', already blocked by thread %ld in procedure %s\n", (long) pthread_self(), (c)->name, (long) (c)->blocker, (c)->blockproc); \ - CRASH; \ - } else { \ - (c)->blocker = pthread_self(); \ - (c)->blockproc = __PRETTY_FUNCTION__; \ - ast_set_flag(c, AST_FLAG_BLOCKING); \ - } } +#define CHECK_BLOCKING(c) do { \ + if (ast_test_flag(c, AST_FLAG_BLOCKING)) {\ + if (option_debug) \ + ast_log(LOG_DEBUG, "Thread %ld Blocking '%s', already blocked by thread %ld in procedure %s\n", (long) pthread_self(), (c)->name, (long) (c)->blocker, (c)->blockproc); \ + CRASH; \ + } else { \ + (c)->blocker = pthread_self(); \ + (c)->blockproc = __PRETTY_FUNCTION__; \ + ast_set_flag(c, AST_FLAG_BLOCKING); \ + } } while (0) ast_group_t ast_get_group(const char *s); |