[Freeswitch-svn] [commit] r13057 - in freeswitch/trunk/src/mod/endpoints: mod_iax mod_loopback

FreeSWITCH SVN anthm at freeswitch.org
Thu Apr 16 07:26:50 PDT 2009


Author: anthm
Date: Thu Apr 16 09:26:50 2009
New Revision: 13057

Log:
autoflush these channels that use queues

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Thu Apr 16 09:26:50 2009
@@ -623,8 +623,9 @@
 			return SWITCH_STATUS_FALSE;
 		}
 
-		switch_core_timer_next(&tech_pvt->timer);
-
+		if (!switch_queue_size(tech_pvt->frame_queue)) {
+			switch_core_timer_next(&tech_pvt->timer);
+		}
 
 		if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
 			if (tech_pvt->read_frame) {

Modified: freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c	Thu Apr 16 09:26:50 2009
@@ -548,8 +548,10 @@
 		goto end;
 	}
 
-
-	switch_core_timer_next(&tech_pvt->timer);
+	if (!switch_queue_size(tech_pvt->frame_queue)) {
+		switch_core_timer_next(&tech_pvt->timer);
+	}
+	
 	if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
 		if (tech_pvt->write_frame) {
 			switch_frame_free(&tech_pvt->write_frame);



More information about the Freeswitch-svn mailing list