]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
apply patch from lele for proxy mode+sip to not kill T38
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Oct 2008 17:12:04 +0000 (17:12 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Oct 2008 17:12:04 +0000 (17:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10111 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_rtp.c

index ff3ffe81cced8a4b033d83e995978ca43321703d..cc68a60a3d3c10b17f4beb28ad8c160f1ae5a9ca 100644 (file)
@@ -651,6 +651,13 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                                return status;
                        }
 
+                       /* Fast PASS! */
+                       if (switch_test_flag((&tech_pvt->read_frame), SFF_PROXY_PACKET)) {
+                               switch_clear_flag_locked(tech_pvt, TFLAG_READING);
+                               *frame = &tech_pvt->read_frame;
+                               return SWITCH_STATUS_SUCCESS;
+                       }
+
                        payload = tech_pvt->read_frame.payload;
 
                        if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
index 24a7313ce93ce43a18decc0ad8eef2dcfcd7dca3..eed77d9db8229ae712c7a3007eefcf7f0cca16d7 100644 (file)
@@ -1308,6 +1308,13 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                        }
                }
 
+               if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
+                       /* Fast PASS! */
+                       *flags |= SFF_PROXY_PACKET;
+                       ret = (int) bytes;
+                       goto end;
+               }
+
                if (bytes) {
                        rtp_session->missed_count = 0;
 
@@ -1321,13 +1328,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                        }
                }
 
-               if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
-                       /* Fast PASS! */
-                       *flags |= SFF_PROXY_PACKET;
-                       ret = (int) bytes;
-                       goto end;
-               }
-
                if (!bytes && (io_flags & SWITCH_IO_FLAG_NOBLOCK)) {
                        return_cng_frame();
                }