add param

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6317 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-11-17 00:26:28 +00:00
parent 74b563c23e
commit 5fe2353c2f
4 changed files with 78 additions and 23 deletions
+1 -1
View File
@@ -456,7 +456,7 @@ SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, sw
\note it's necessary to test if the return val is the same as the input and free the string if it is not.
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel, char *in);
SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *channel, switch_caller_profile_t *caller_profile, const char *prefix);
/** @} */
@@ -186,7 +186,7 @@ static switch_status_t dialplan_xml_locate(switch_core_session_t *session, switc
switch_status_t status = SWITCH_STATUS_GENERR;
channel = switch_core_session_get_channel(session);
data = switch_channel_build_param_string(channel, caller_profile);
data = switch_channel_build_param_string(channel, caller_profile, NULL);
status = switch_xml_locate("dialplan", NULL, NULL, NULL, root, node, data);
switch_safe_free(data);
+5 -1
View File
@@ -1510,7 +1510,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
return data;
}
SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *channel, switch_caller_profile_t *caller_profile, const char *prefix)
{
switch_stream_handle_t stream = { 0 };
switch_size_t encode_len = 1024, new_len = 0;
@@ -1522,6 +1522,10 @@ SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *chann
SWITCH_STANDARD_STREAM(stream);
if (prefix) {
stream.write_function(&stream, "%s&", prefix);
}
encode_buf = malloc(encode_len);
assert(encode_buf);