another step closer
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3119 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
747ab41f78
commit
4943c5939f
|
@ -307,8 +307,14 @@ SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel,
|
||||||
|
|
||||||
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, char *varname)
|
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, char *varname)
|
||||||
{
|
{
|
||||||
|
char *v;
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
return switch_core_hash_find(channel->variables, varname);
|
|
||||||
|
if (!(v=switch_core_hash_find(channel->variables, varname))) {
|
||||||
|
v = switch_caller_get_field_by_name(channel->caller_profile, varname);
|
||||||
|
}
|
||||||
|
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)
|
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)
|
||||||
|
|
Loading…
Reference in New Issue