]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11693 [core] speed up switch_channel_get_log_tags() for the case when none are set
authorChris Rienzo <chris@signalwire.com>
Sat, 9 Mar 2019 18:19:19 +0000 (18:19 +0000)
committerChris Rienzo <chris@rienzo.com>
Sat, 9 Mar 2019 20:22:03 +0000 (15:22 -0500)
src/switch_channel.c

index b282e2385a0b748ecc8cefa038c2e97927df60e5..3351a5d1111dd299aaa830e266d154c16bce20e3 100644 (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);