FS-11693 [core] speed up switch_channel_get_log_tags() for the case when none are set

This commit is contained in:
Chris Rienzo 2019-03-09 18:19:19 +00:00 committed by Chris Rienzo
parent fd30f1161d
commit 7e6206325a
1 changed files with 3 additions and 0 deletions

View File

@ -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);