From 5fe2353c2fc7c43eb8c4cbe169dc2ab56d59ea55 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 17 Nov 2007 00:26:28 +0000 Subject: [PATCH] add param git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6317 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/xmlrpc-c/xmlrpc_amconfig.h.in | 91 +++++++++++++++---- src/include/switch_channel.h | 2 +- .../mod_dialplan_xml/mod_dialplan_xml.c | 2 +- src/switch_channel.c | 6 +- 4 files changed, 78 insertions(+), 23 deletions(-) diff --git a/libs/xmlrpc-c/xmlrpc_amconfig.h.in b/libs/xmlrpc-c/xmlrpc_amconfig.h.in index 19f64ebdd9..99479b65af 100644 --- a/libs/xmlrpc-c/xmlrpc_amconfig.h.in +++ b/libs/xmlrpc-c/xmlrpc_amconfig.h.in @@ -1,34 +1,85 @@ -/* xmlrpc_amconfig.h is generated by 'configure' from the template - xmlrpc_amconfig.h.in, by virtue of the AM_CONFIG_HEADER() macro in - configure.in. +/* xmlrpc_amconfig.h.in. Generated from configure.in by autoheader. */ - We'd like to replace it some day with something that doesn't use - such a special tool, to make the build understandable by dumber - developers. -*/ - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -#undef HAVE_SETGROUPS +/* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF -#undef HAVE_SETENV -#undef HAVE_WCSNCMP -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the `setgroups' function. */ +#undef HAVE_SETGROUPS + +/* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* Define to 1 if you have the `wcsncmp' function. */ +#undef HAVE_WCSNCMP /* Name of package */ #undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to `unsigned' if does not define. */ +#undef size_t diff --git a/src/include/switch_channel.h b/src/include/switch_channel.h index 3c36a57cf9..80057584bc 100644 --- a/src/include/switch_channel.h +++ b/src/include/switch_channel.h @@ -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); /** @} */ diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c index f368244eae..31efcec897 100644 --- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c @@ -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); diff --git a/src/switch_channel.c b/src/switch_channel.c index 649c301f01..4c7c256bd1 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -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);