mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
FS-7761 [core] fix shutdown races running api commands during shutdown
This commit is contained in:
@@ -1362,7 +1362,11 @@ SWITCH_DECLARE(const char *) switch_lookup_timezone(const char *tz_name)
|
||||
{
|
||||
char *value = NULL;
|
||||
|
||||
if (tz_name && (value = switch_core_hash_find(TIMEZONES_LIST.hash, tz_name)) == NULL) {
|
||||
if (zstr(tz_name) || !TIMEZONES_LIST.hash) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((value = switch_core_hash_find(TIMEZONES_LIST.hash, tz_name)) == NULL) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timezone '%s' not found!\n", tz_name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user