aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-11 18:18:16 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-11 18:18:16 +0000
commit02e87fc6524c2df91cfa8662689f3b33985e3eae (patch)
treef88b7951408fd32dee36fdba67ee16e72e554a5f /main/channel.c
parent178171468aa29b67846684a743c388015193141c (diff)
Make calls to ast_assert() actually test something, so that the error message
printed is not nonsensical (reported by mvanbaak via #asterisk-bugs). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@121861 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index 5fff0f7d9..ad7513cff 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -912,7 +912,7 @@ int ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin)
if (((fin->frametype == AST_FRAME_VOICE) && (qlen > 96)) || (qlen > 128)) {
if (fin->frametype != AST_FRAME_VOICE) {
ast_log(LOG_WARNING, "Exceptionally long queue length queuing to %s\n", chan->name);
- ast_assert(0);
+ ast_assert(fin->frametype == AST_FRAME_VOICE);
} else {
if (option_debug)
ast_log(LOG_DEBUG, "Dropping voice to exceptionally long queue on %s\n", chan->name);
@@ -1476,7 +1476,7 @@ int ast_hangup(struct ast_channel *chan)
ast_log(LOG_WARNING, "Hard hangup called by thread %ld on %s, while fd "
"is blocked by thread %ld in procedure %s! Expect a failure\n",
(long)pthread_self(), chan->name, (long)chan->blocker, chan->blockproc);
- ast_assert(0);
+ ast_assert(ast_test_flag(chan, AST_FLAG_BLOCKING) == 0);
}
if (!ast_test_flag(chan, AST_FLAG_ZOMBIE)) {
if (option_debug)