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

FreeSWITCH SVN brian at freeswitch.org
Tue May 26 09:26:56 PDT 2009


Author: brian
Date: Tue May 26 11:26:56 2009
New Revision: 13436

Log:
 this hsould make sure the secure mitm has a chance over latent connections

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	Tue May 26 11:26:56 2009
@@ -2257,12 +2257,11 @@
 	frame->m = rtp_session->recv_msg.header.m ? SWITCH_TRUE : SWITCH_FALSE;
 
 #ifdef ENABLE_ZRTP
-	if (zrtp_on && switch_test_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_MITM) && switch_test_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_RECV)) {
+	if (zrtp_on && switch_test_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_MITM)) {
 		frame->extra_data = rtp_session->zrtp_ctx;
 		switch_set_flag(frame, SFF_ZRTP);
 		if (rtp_session->zrtp_mitm_tries > 10) {
 			switch_clear_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_MITM);
-			rtp_session->zrtp_mitm_tries = 0;
 		}
 		rtp_session->zrtp_mitm_tries++;
 	}
@@ -2690,9 +2689,9 @@
 	}
 
 #ifdef ENABLE_ZRTP
-	if (zrtp_on && switch_test_flag(frame, SFF_ZRTP) && switch_test_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_SEND)) {
+	if (zrtp_on && switch_test_flag(frame, SFF_ZRTP)) {
 		
-		if (zrtp_status_ok == zrtp_resolve_mitm_call(frame->extra_data, rtp_session->zrtp_ctx) || rtp_session->zrtp_mitm_tries > 10) {
+		if (zrtp_status_ok == zrtp_resolve_mitm_call(frame->extra_data, rtp_session->zrtp_ctx)) {
 			switch_clear_flag(rtp_session, SWITCH_ZRTP_FLAG_SECURE_MITM);
 		}
 		rtp_session->zrtp_mitm_tries++;



More information about the Freeswitch-svn mailing list