[Freeswitch-svn] [commit] r10453 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Tue Nov 18 17:24:38 PST 2008


Author: anthm
Date: Tue Nov 18 20:24:37 2008
New Revision: 10453

Log:
tweak media bugs timeout

Modified:
   freeswitch/trunk/src/switch_core_io.c

Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c	(original)
+++ freeswitch/trunk/src/switch_core_io.c	Tue Nov 18 20:24:37 2008
@@ -318,15 +318,12 @@
 					switch_mutex_lock(bp->read_mutex);
 					switch_buffer_write(bp->raw_read_buffer, read_frame->data, read_frame->datalen);
 					if (bp->callback) {
-						if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ) == SWITCH_FALSE
-							|| (bp->stop_time && bp->stop_time <= switch_timestamp(NULL))) {
-							ok = SWITCH_FALSE;
-						}
+						ok = bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ);
 					}
 					switch_mutex_unlock(bp->read_mutex);
 				}
-
-				if (switch_test_flag(bp, SMBF_READ_REPLACE)) {
+				
+				if (ok && switch_test_flag(bp, SMBF_READ_REPLACE)) {
 					do_bugs = 0;
 					if (bp->callback) {
 						bp->read_replace_frame_in = read_frame;
@@ -336,6 +333,10 @@
 						}
 					}
 				}
+				
+				if (bp->stop_time && bp->stop_time <= switch_timestamp(NULL)) {
+					ok = SWITCH_FALSE;
+				}
 
 				if (ok == SWITCH_FALSE) {
 					bp->ready = 0;



More information about the Freeswitch-svn mailing list