]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10369: [freeswitch-core] Preserve original progress time when getting more than one
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 6 Jun 2017 14:08:09 +0000 (09:08 -0500)
committerMike Jerris <mike@jerris.com>
Tue, 6 Jun 2017 14:41:16 +0000 (09:41 -0500)
src/switch_channel.c

index 9111224a0bdc00cc25130332988e13831f2f8350..83720793e80a76d6019904bf508cd9c021100c0f 100644 (file)
@@ -3323,9 +3323,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(swi
                                if ((other_session = switch_core_session_locate(channel->caller_profile->originator_caller_profile->uuid))) {
                                        switch_channel_t *other_channel;
                                        other_channel = switch_core_session_get_channel(other_session);
-                                       if (other_channel->caller_profile) {
+                                       switch_mutex_lock(other_channel->profile_mutex);
+                                       if (other_channel->caller_profile && !other_channel->caller_profile->times->progress) {
                                                other_channel->caller_profile->times->progress = channel->caller_profile->times->progress;
                                        }
+                                       switch_mutex_unlock(other_channel->profile_mutex);
                                        switch_core_session_rwunlock(other_session);
                                }
                                channel->caller_profile->originator_caller_profile->times->progress = channel->caller_profile->times->progress;