From 5eeed0f792b376f0f4ba38e2d4237e2cafeb370f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 5 Jun 2017 14:20:21 -0500 Subject: [PATCH] FS-10369: [freeswitch-core] Preserve original progress time when getting more than one #resolve --- src/switch_channel.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index 66d1be960b..2b4af66dab 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -3315,9 +3315,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(swi switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_channel_get_uuid(channel), SWITCH_LOG_NOTICE, "Ring-Ready %s!\n", channel->name); switch_channel_set_flag_value(channel, CF_RING_READY, rv); - - if (channel->caller_profile && channel->caller_profile->times) { - switch_mutex_lock(channel->profile_mutex); + switch_mutex_lock(channel->profile_mutex); + if (channel->caller_profile && channel->caller_profile->times && !channel->caller_profile->times->progress) { channel->caller_profile->times->progress = switch_micro_time_now(); if (channel->caller_profile->originator_caller_profile) { switch_core_session_t *other_session; @@ -3331,8 +3330,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(swi } channel->caller_profile->originator_caller_profile->times->progress = channel->caller_profile->times->progress; } - switch_mutex_unlock(channel->profile_mutex); } + switch_mutex_unlock(channel->profile_mutex); if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PROGRESS) == SWITCH_STATUS_SUCCESS) { switch_channel_event_set_data(channel, event);