summaryrefslogtreecommitdiff
path: root/main/abstract_jb.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-06-11 18:19:24 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-06-11 18:19:24 +0000
commit467c6f5f90c40c0e7e7e8dd2fc3d0f71d106287c (patch)
tree078006f677b86a437a77ac44e295a2360bc65346 /main/abstract_jb.c
parent463934753199be8743409d08cc9365f18286bc39 (diff)
Merged revisions 121861 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r121861 | tilghman | 2008-06-11 13:18:16 -0500 (Wed, 11 Jun 2008) | 3 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@121867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/abstract_jb.c')
-rw-r--r--main/abstract_jb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/abstract_jb.c b/main/abstract_jb.c
index a4637c1b0..d7f9a57b7 100644
--- a/main/abstract_jb.c
+++ b/main/abstract_jb.c
@@ -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");
- ast_assert(0);
+ ast_assert("JB type unknown" == NULL);
break;
}
@@ -484,10 +484,9 @@ static int create_jb(struct ast_channel *chan, struct ast_frame *frr)
*tmp = '#';
bridged = ast_bridged_channel(chan);
- if (!bridged) {
- /* We should always have bridged chan if a jitterbuffer is in use */
- ast_assert(0);
- }
+ /* We should always have bridged chan if a jitterbuffer is in use */
+ ast_assert(bridged != NULL);
+
snprintf(name1, sizeof(name1), "%s", bridged->name);
tmp = strchr(name1, '/');
if (tmp)