summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/abstract_jb.c9
-rw-r--r--main/channel.c4
-rw-r--r--main/sched.c2
3 files changed, 7 insertions, 8 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)
diff --git a/main/channel.c b/main/channel.c
index 3364a175d..1409ef095 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -983,7 +983,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);
- ast_assert(0);
+ ast_assert(fin->frametype == AST_FRAME_VOICE);
} else {
ast_debug(1, "Dropping voice to exceptionally long queue on %s\n", chan->name);
ast_frfree(f);
@@ -1641,7 +1641,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);
- ast_assert(0);
+ ast_assert(ast_test_flag(chan, AST_FLAG_BLOCKING) == 0);
}
if (!ast_test_flag(chan, AST_FLAG_ZOMBIE)) {
ast_debug(1, "Hanging up channel '%s'\n", chan->name);
diff --git a/main/sched.c b/main/sched.c
index c40375d72..ee9d43125 100644
--- a/main/sched.c
+++ b/main/sched.c
@@ -373,7 +373,7 @@ int ast_sched_del(struct sched_context *con, int id)
if (!s) {
ast_debug(1, "Attempted to delete nonexistent schedule entry %d!\n", id);
- ast_assert(0);
+ ast_assert(s != NULL);
return -1;
}