[Freeswitch-svn] [commit] r8838 - freeswitch/trunk/src/mod/endpoints/mod_iax

Freeswitch SVN anthm at freeswitch.org
Tue Jun 24 18:43:58 EDT 2008


Author: anthm
Date: Tue Jun 24 18:43:58 2008
New Revision: 8838

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

Log:
add timeout to iax read

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	Tue Jun 24 18:43:58 2008
@@ -574,6 +574,7 @@
 {
 	private_t *tech_pvt = switch_core_session_get_private(session);
 	switch_byte_t *data;
+	int ms_count = 0;
 
 	switch_assert(tech_pvt != NULL);
 	tech_pvt->read_frame.flags = SFF_NONE;
@@ -615,6 +616,9 @@
 		}
 
 		switch_yield(1000);
+		if (++ms_count >= 30000) {
+			break;
+		}
 	}
 
 	return SWITCH_STATUS_FALSE;



More information about the Freeswitch-svn mailing list