From ba2a80e3bc1468fd87c6c7ceca07a6f1a9706b89 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 1 Aug 2009 06:11:22 +0000 Subject: [PATCH] fix heartbeat in scheduler mode VERBAL-00 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14450 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_session.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 92a399fc60..3056b3831e 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -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; }