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

Freeswitch SVN anthm at freeswitch.org
Wed Mar 12 09:41:31 EDT 2008


Author: anthm
Date: Wed Mar 12 09:41:30 2008
New Revision: 7879

Modified:
   freeswitch/trunk/src/switch_rtp.c

Log:
sync

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Wed Mar 12 09:41:30 2008
@@ -1141,8 +1141,13 @@
 			if (bytes) {
 				check++;
 				switch_core_timer_sync(&rtp_session->timer);
+			} else {
+				check = (uint8_t) (switch_core_timer_check(&rtp_session->timer, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS);						
 			}
-			check = (uint8_t) (switch_core_timer_check(&rtp_session->timer, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS);
+		} 
+
+		if (check) {
+			do_2833(rtp_session);
 		}
 
 		if (bytes && rtp_session->recv_msg.header.version != 2) {
@@ -1303,8 +1308,7 @@
 			}
 		}
 
-		if (check) {
-			do_2833(rtp_session);
+		if (check || (bytes && !rtp_session->timer.interval)) {
 			if (!bytes && rtp_session->max_missed_packets) {
 				if (++rtp_session->missed_count >= rtp_session->max_missed_packets) {
 					ret = -2;
@@ -1401,10 +1405,6 @@
 			*flags |= SFF_CNG;
 		}
 
-		if (bytes > 0) {
-			do_2833(rtp_session);
-		}
-
 		ret = (int) bytes;
 	} else {
 		ret = -1;



More information about the Freeswitch-svn mailing list