]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix heartbeat in scheduler mode VERBAL-00
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 1 Aug 2009 06:11:22 +0000 (06:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 1 Aug 2009 06:11:22 +0000 (06:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14450 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_session.c

index 92a399fc608fe6acd0ff738bf4a603427ca705dd..3056b3831e54e04b246aaa6df693d906d7a8952c 100644 (file)
@@ -1028,6 +1028,8 @@ SWITCH_DECLARE(void) switch_core_session_enable_heartbeat(switch_core_session_t
                seconds = 60;
        }
 
+       session->track_duration = seconds;
+
        if (switch_channel_test_flag(session->channel,  CF_PROXY_MODE)) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s using scheduler due to bypass_media mode\n", switch_channel_get_name(session->channel));
                switch_core_session_sched_heartbeat(session, seconds);
@@ -1038,7 +1040,7 @@ SWITCH_DECLARE(void) switch_core_session_enable_heartbeat(switch_core_session_t
        
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s setting session heartbeat to %u second(s).\n", 
                                          switch_channel_get_name(session->channel), seconds);
-       session->track_duration = seconds;
+
        session->read_frame_count = 0;
        
 }