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

FreeSWITCH SVN brian at freeswitch.org
Fri May 22 09:35:38 PDT 2009


Author: brian
Date: Fri May 22 11:35:37 2009
New Revision: 13425

Log:
 adding buffer flush 

Modified:
   freeswitch/trunk/src/switch_rtp.c

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Fri May 22 11:35:37 2009
@@ -439,6 +439,8 @@
 	case ZRTP_EVENT_IS_SECURE_DONE:
 		break;
 	case ZRTP_EVENT_IS_SECURE:
+		/* Flush buffer just in case we have packets that aren't encrypted */
+		rtp_flush_read_buffer(rtp_session, SWITCH_RTP_FLUSH_ONCE);
 		switch_set_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_SEND);
 		switch_set_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_RECV);
 		break;
@@ -451,6 +453,8 @@
 	case ZRTP_EVENT_IS_PENDINGSECURE:
 		break;
 	case ZRTP_EVENT_IS_PENDINGCLEAR:
+		/* Flush buffer just in case we have packets that are encrypted */
+		rtp_flush_read_buffer(rtp_session, SWITCH_RTP_FLUSH_ONCE);
 		switch_clear_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_SEND);
 		switch_clear_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_RECV);
 		break;



More information about the Freeswitch-svn mailing list