[Freeswitch-svn] [commit] r2194 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

Freeswitch SVN anthm at freeswitch.org
Thu Jul 27 17:39:51 EDT 2006


Author: anthm
Date: Thu Jul 27 17:39:50 2006
New Revision: 2194

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Log:
tweak js

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Thu Jul 27 17:39:50 2006
@@ -1705,12 +1705,15 @@
 				}
 
 			} else {
-				if (switch_core_session_read_frame(session, &read_frame, -1, 0) != SWITCH_STATUS_SUCCESS) {
+				switch_status_t status;
+				status = switch_core_session_read_frame(session, &read_frame, -1, 0);
+				
+				if (!SWITCH_READ_ACCEPTABLE(status)) {
 					break;
 				}
 			}
 			if ((write_frame.datalen = (uint32_t)switch_buffer_read(tto->audio_buffer, fdata, write_frame.codec->implementation->bytes_per_frame)) <= 0) {
-				if (loops > 0) { 
+				if (loops) { 
 					switch_buffer_t *tmp;
 
 					/* Switcharoo*/
@@ -1719,11 +1722,12 @@
 					tto->loop_buffer = tmp;
 					loops--;
 					/* try again */
-					if ((write_frame.datalen = (uint32_t)switch_buffer_read(tto->audio_buffer, fdata, write_frame.codec->implementation->bytes_per_frame)) <= 0) {
+					if ((write_frame.datalen = 
+						 (uint32_t)switch_buffer_read(tto->audio_buffer, fdata, write_frame.codec->implementation->bytes_per_frame)) <= 0) {
 						break;
 					}
 				} else {
-					continue;
+					break;
 				}
 			}
 



More information about the Freeswitch-svn mailing list