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
This commit is contained in:
Russell Bryant
2008-05-14 21:40:43 +00:00
parent c51989a309
commit 08f91c1192
8 changed files with 36 additions and 22 deletions

View File

@@ -430,7 +430,7 @@ static void jb_get_and_deliver(struct ast_channel *chan)
return;
default:
ast_log(LOG_ERROR, "This should never happen!\n");
CRASH;
ast_assert(0);
break;
}
@@ -486,7 +486,7 @@ static int create_jb(struct ast_channel *chan, struct ast_frame *frr)
bridged = ast_bridged_channel(chan);
if (!bridged) {
/* We should always have bridged chan if a jitterbuffer is in use */
CRASH;
ast_assert(0);
}
snprintf(name1, sizeof(name1), "%s", bridged->name);
tmp = strchr(name1, '/');