]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
this hsould make sure the secure mitm has a chance over latent connections
authorBrian West <brian@freeswitch.org>
Tue, 26 May 2009 16:26:56 +0000 (16:26 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 26 May 2009 16:26:56 +0000 (16:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13436 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_rtp.c

index 939aa1a37ee9bfe08dc84b4f57e28b2baf62268b..62ad9ffc7e22439b2fd9d09c85e462950f4f4b30 100644 (file)
@@ -2257,12 +2257,11 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
        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 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
        }
 
 #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++;