diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-14 21:32:00 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-14 21:32:00 +0000 |
commit | 848841973a5c5b8d2de336ed32f5b4ab80ca8d79 (patch) | |
tree | d36d7d542d0d6ba89c806a8acd12d366bd58a368 /main/abstract_jb.c | |
parent | ec6b2c6e0554dd4374dea87f80d99f9495a80b03 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@116463 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/abstract_jb.c')
-rw-r--r-- | main/abstract_jb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/abstract_jb.c b/main/abstract_jb.c index ed2600070..25bd8fd0d 100644 --- a/main/abstract_jb.c +++ b/main/abstract_jb.c @@ -433,7 +433,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; } @@ -489,7 +489,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, '/'); |