diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-11 18:18:16 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-11 18:18:16 +0000 |
commit | 02e87fc6524c2df91cfa8662689f3b33985e3eae (patch) | |
tree | f88b7951408fd32dee36fdba67ee16e72e554a5f /main/abstract_jb.c | |
parent | 178171468aa29b67846684a743c388015193141c (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/abstract_jb.c')
-rw-r--r-- | main/abstract_jb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/main/abstract_jb.c b/main/abstract_jb.c index 25bd8fd0d..1fd4dcdcd 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"); - ast_assert(0); + ast_assert("JB type unknown" == NULL); break; } @@ -487,10 +487,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) |