[Freeswitch-trunk] [commit] r12445 - freeswitch/trunk/src

FreeSWITCH SVN mikej at freeswitch.org
Wed Mar 4 20:49:19 PST 2009


Author: mikej
Date: Wed Mar  4 22:49:19 2009
New Revision: 12445

Log:
actually return from error condition

Modified:
   freeswitch/trunk/src/switch_core_media_bug.c

Modified: freeswitch/trunk/src/switch_core_media_bug.c
==============================================================================
--- freeswitch/trunk/src/switch_core_media_bug.c	(original)
+++ freeswitch/trunk/src/switch_core_media_bug.c	Wed Mar  4 22:49:19 2009
@@ -124,6 +124,7 @@
 	
 	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_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) {



More information about the Freeswitch-trunk mailing list