mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
FSCORE-612 with mods
This commit is contained in:
@@ -195,7 +195,7 @@ struct switch_runtime {
|
||||
switch_time_t initiated;
|
||||
switch_time_t reference;
|
||||
int64_t offset;
|
||||
switch_hash_t *global_vars;
|
||||
switch_event_t *global_vars;
|
||||
switch_hash_t *mime_types;
|
||||
switch_memory_pool_t *memory_pool;
|
||||
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
|
||||
|
||||
@@ -750,6 +750,17 @@ SWITCH_DECLARE(char *) switch_core_get_variable(_In_z_ const char *varname);
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_set_variable(_In_z_ const char *varname, _In_opt_z_ const char *value);
|
||||
|
||||
/*!
|
||||
\brief Conditionally add a global variable to the core
|
||||
\param varname the name of the variable
|
||||
\param value the value of the variable
|
||||
\param val2 the value of the variable to verify against
|
||||
\ If the global did not exist and val2=="", add global with value, return true
|
||||
\ If the global exists with the value of val2, replace it, return true
|
||||
\ If the global exists with a value other than val2, return false
|
||||
*/
|
||||
SWITCH_DECLARE(switch_bool_t) switch_core_set_var_conditional(_In_z_ const char *varname, _In_opt_z_ const char *value, _In_opt_z_ const char *val2);
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_dump_variables(_In_ switch_stream_handle_t *stream);
|
||||
|
||||
/*!
|
||||
|
||||
@@ -754,8 +754,9 @@ SWITCH_STACK_TOP - Stack on the top
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
SWITCH_STACK_BOTTOM,
|
||||
SWITCH_STACK_TOP
|
||||
SWITCH_STACK_BOTTOM = (1 << 0),
|
||||
SWITCH_STACK_TOP = (1 << 1),
|
||||
SWITCH_STACK_NODUP = (1 << 2)
|
||||
} switch_stack_t;
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user