From 8295c7a6447876ba917c3b806108ae54c3e06fa2 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 5 Mar 2009 04:49:19 +0000 Subject: [PATCH] actually return from error condition git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12445 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_media_bug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index d339aa9e6a..a8c40bb2b2 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -124,6 +124,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b if (!(bug->raw_read_buffer && (bug->raw_write_buffer || !switch_test_flag(bug, SMBF_WRITE_STREAM)))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%sBuffer Error\n", switch_channel_get_name(bug->session->channel)); + return SWITCH_STATUS_FALSE; } frame->datalen = 0; @@ -137,6 +138,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b switch_mutex_unlock(bug->read_mutex); if (switch_test_flag(bug, SMBF_WRITE_STREAM)) { + switch_assert(bug->raw_write_buffer); switch_mutex_lock(bug->write_mutex); datalen = (uint32_t) switch_buffer_read(bug->raw_write_buffer, bug->data, bytes); if (datalen < bytes) {