mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 07:04:17 +00:00
add switch_core_get_variables and allow execute_on funcs to see global vars too
This commit is contained in:
1 parent
eed868af6c
commit
861c3e3ccc
4 files changed
+19
-6
No files matched your search
@@ -307,6 +307,15 @@ SWITCH_DECLARE(const char *) switch_core_get_switchname(void)
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_get_variables(switch_event_t **event)
|
||||
{
|
||||
switch_status_t status;
|
||||
switch_thread_rwlock_rdlock(runtime.global_var_rwlock);
|
||||
status = switch_event_dup(event, runtime.global_vars);
|
||||
switch_thread_rwlock_unlock(runtime.global_var_rwlock);
|
||||
return status;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) switch_core_get_variable(const char *varname)
|
||||
{
|
||||
char *val;
|
||||
|
||||
Reference in new issue
Block a user