]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
autoflush these channels that use queues
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 16 Apr 2009 14:26:50 +0000 (14:26 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 16 Apr 2009 14:26:50 +0000 (14:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13057 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_loopback/mod_loopback.c

index e06157d475bef04ca7408eb315e71b18432cd1e5..c2e4364ca3c95c69c72e185d8c4b0956fb5f1af6 100644 (file)
@@ -623,8 +623,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
                        return SWITCH_STATUS_FALSE;
                }
 
-               switch_core_timer_next(&tech_pvt->timer);
-
+               if (!switch_queue_size(tech_pvt->frame_queue)) {
+                       switch_core_timer_next(&tech_pvt->timer);
+               }
 
                if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
                        if (tech_pvt->read_frame) {
index 49731e7b5d3e1f16542ba07c70ca9cb0f4a9c0af..c1245b14bf535134815c582c8022321d4c9e0615 100644 (file)
@@ -548,8 +548,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
                goto end;
        }
 
-
-       switch_core_timer_next(&tech_pvt->timer);
+       if (!switch_queue_size(tech_pvt->frame_queue)) {
+               switch_core_timer_next(&tech_pvt->timer);
+       }
+       
        if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
                if (tech_pvt->write_frame) {
                        switch_frame_free(&tech_pvt->write_frame);