From 7e6206325a82c07168c6cba4fe81e0502bd5a83f Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Sat, 9 Mar 2019 18:19:19 +0000 Subject: [PATCH] FS-11693 [core] speed up switch_channel_get_log_tags() for the case when none are set --- src/switch_channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/switch_channel.c b/src/switch_channel.c index b282e2385a..3351a5d111 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1440,6 +1440,9 @@ SWITCH_DECLARE(switch_status_t) switch_channel_get_log_tags(switch_channel_t *ch { switch_status_t status = SWITCH_STATUS_FALSE; switch_assert(channel != NULL); + if (!channel->log_tags) { + return status; + } switch_mutex_lock(channel->profile_mutex); if (channel->log_tags && log_tags) { status = switch_event_dup(log_tags, channel->log_tags);