summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-05-14 21:40:43 +0000
committerRussell Bryant <russell@russellbryant.com>2008-05-14 21:40:43 +0000
commit08f91c1192559e847f955c57e7b259a9f1560a43 (patch)
treea37ef618305865e834fceab21afbecc8214fa482 /main/channel.c
parentc51989a309f2b50714f4c1bcad3987913fdb1f56 (diff)
Merged revisions 116463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue #12650) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 099924470..745d0cf91 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -982,7 +982,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);
- CRASH;
+ ast_assert(0);
} else {
ast_debug(1, "Dropping voice to exceptionally long queue on %s\n", chan->name);
ast_frfree(f);
@@ -1625,7 +1625,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);
- CRASH;
+ ast_assert(0);
}
if (!ast_test_flag(chan, AST_FLAG_ZOMBIE)) {
ast_debug(1, "Hanging up channel '%s'\n", chan->name);