mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-11860 [core] allow configurable separator in event_channel and
process all parts of key
This commit is contained in:
@@ -2360,10 +2360,23 @@ static void switch_load_core_config(const char *file)
|
||||
} else {
|
||||
switch_clear_flag((&runtime), SCF_CPF_SOFT_LOOKUP);
|
||||
}
|
||||
} else if (!strcasecmp(var, "event-channel-key-separator") && !zstr(val)) {
|
||||
runtime.event_channel_key_separator = switch_core_strdup(runtime.memory_pool, val);
|
||||
} else if (!strcasecmp(var, "event-channel-enable-hierarchy-deliver") && !zstr(val)) {
|
||||
int v = switch_true(val);
|
||||
if (v) {
|
||||
switch_set_flag((&runtime), SCF_EVENT_CHANNEL_ENABLE_HIERARCHY_DELIVERY);
|
||||
} else {
|
||||
switch_clear_flag((&runtime), SCF_EVENT_CHANNEL_ENABLE_HIERARCHY_DELIVERY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (runtime.event_channel_key_separator == NULL) {
|
||||
runtime.event_channel_key_separator = switch_core_strdup(runtime.memory_pool, ".");
|
||||
}
|
||||
|
||||
if ((settings = switch_xml_child(cfg, "variables"))) {
|
||||
for (param = switch_xml_child(settings, "variable"); param; param = param->next) {
|
||||
const char *var = switch_xml_attr_soft(param, "name");
|
||||
@@ -3375,6 +3388,11 @@ SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_end_port()
|
||||
return end_port;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_core_get_event_channel_key_separator(void)
|
||||
{
|
||||
return runtime.event_channel_key_separator;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
||||
Reference in New Issue
Block a user