mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-02 01:25:11 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6455 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
a8433a1956
commit
dc96942b88
10 files changed
+23
-26
No files matched your search
@@ -47,7 +47,7 @@ SWITCH_STANDARD_API(find_user_function)
|
||||
int argc;
|
||||
char *mydata = NULL, *argv[3];
|
||||
char *key, *user, *domain;
|
||||
char *xmlstr, *xs;
|
||||
char *xmlstr;
|
||||
|
||||
if (!cmd) {
|
||||
stream->write_function(stream, "bad args\n");
|
||||
@@ -82,14 +82,10 @@ SWITCH_STANDARD_API(find_user_function)
|
||||
end:
|
||||
|
||||
if (xml && x_user) {
|
||||
xmlstr = switch_xml_toxml(x_user);
|
||||
xmlstr = switch_xml_toxml(x_user, SWITCH_FALSE);
|
||||
assert(xmlstr);
|
||||
if ((xs = strstr(xmlstr, "?>"))) {
|
||||
xs += 2;
|
||||
} else {
|
||||
xs = xmlstr;
|
||||
}
|
||||
stream->write_function(stream, "%s", xs);
|
||||
|
||||
stream->write_function(stream, "%s", xmlstr);
|
||||
free(xmlstr);
|
||||
switch_xml_free(xml);
|
||||
|
||||
@@ -1607,7 +1603,7 @@ SWITCH_STANDARD_API(show_function)
|
||||
snprintf(count, sizeof(count), "%d", holder.count);
|
||||
|
||||
switch_xml_set_attr(switch_xml_set_flag(holder.xml, SWITCH_XML_DUP), strdup("row_count"), strdup(count));
|
||||
xmlstr = switch_xml_toxml(holder.xml);
|
||||
xmlstr = switch_xml_toxml(holder.xml, SWITCH_FALSE);
|
||||
|
||||
if (xmlstr) {
|
||||
holder.stream->write_function(holder.stream, "%s", xmlstr);
|
||||
|
||||
@@ -527,7 +527,7 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
switch_mutex_unlock(node->mutex);
|
||||
}
|
||||
}
|
||||
xml_text = switch_xml_toxml(x_report);
|
||||
xml_text = switch_xml_toxml(x_report, SWITCH_FALSE);
|
||||
assert(xml_text);
|
||||
stream->write_function(stream, "%s\n", xml_text);
|
||||
switch_xml_free(x_report);
|
||||
|
||||
@@ -2595,7 +2595,7 @@ static void do_rss(vm_profile_t *profile, char *user, char *domain, char *host,
|
||||
sql = switch_mprintf("select * from voicemail_data where user='%s' and domain='%s' order by read_flags", user, domain);
|
||||
vm_execute_sql_callback(profile, profile->mutex, sql, rss_callback, &holder);
|
||||
|
||||
xmlstr = switch_xml_toxml(holder.xml);
|
||||
xmlstr = switch_xml_toxml(holder.xml, SWITCH_TRUE);
|
||||
|
||||
stream->write_function(stream, "%s", xmlstr);
|
||||
|
||||
|
||||
@@ -731,7 +731,7 @@ static void dl_logger(char *file, const char *func, int line, int level, char *f
|
||||
*xmltxt++ = '\0';
|
||||
if (strlen(xmltxt) > 2) {
|
||||
xml = switch_xml_parse_str(xmltxt, strlen(xmltxt));
|
||||
form = switch_xml_toxml(xml);
|
||||
form = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, level,
|
||||
"%s:\n-------------------------------------------------------------------------------\n"
|
||||
"%s\n", ll, form);
|
||||
@@ -2301,7 +2301,7 @@ static void do_vcard(ldl_handle_t *handle, char *to, char *from, char *id)
|
||||
|
||||
switch_xml_set_attr(vcard, "xmlns", "vcard-tmp");
|
||||
|
||||
if ((xmlstr = switch_xml_toxml(vcard))) {
|
||||
if ((xmlstr = switch_xml_toxml(vcard, SWITCH_FALSE))) {
|
||||
ldl_handle_send_vcard(handle, to, from, id, xmlstr);
|
||||
sent = 1;
|
||||
} else {
|
||||
|
||||
@@ -471,7 +471,7 @@ static switch_status_t read_packet(listener_t * listener, switch_event_t **event
|
||||
etype = "xml";
|
||||
|
||||
if ((xml = switch_event_xmlize(event, "%s", ""))) {
|
||||
listener->ebuf = switch_xml_toxml(xml);
|
||||
listener->ebuf = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
switch_xml_free(xml);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "XML ERROR!\n");
|
||||
|
||||
@@ -50,7 +50,7 @@ static void event_handler(switch_event_t *event)
|
||||
default:
|
||||
switch_event_serialize(event, &buf);
|
||||
if ((xml = switch_event_xmlize(event, NULL))) {
|
||||
xmlstr = switch_xml_toxml(xml);
|
||||
xmlstr = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
dofree++;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ static JSBool request_dump_env(JSContext *cx, JSObject *obj, uintN argc, jsval *
|
||||
switch_xml_t xml;
|
||||
char *xmlstr;
|
||||
if ((xml = switch_event_xmlize(ro->stream->event, SWITCH_VA_NONE))) {
|
||||
xmlstr = switch_xml_toxml(xml);
|
||||
xmlstr = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, xmlstr));
|
||||
return JS_TRUE;
|
||||
}
|
||||
@@ -646,7 +646,7 @@ static JSBool event_serialize(JSContext * cx, JSObject * obj, uintN argc, jsval
|
||||
switch_xml_t xml;
|
||||
char *xmlstr;
|
||||
if ((xml = switch_event_xmlize(eo->event, SWITCH_VA_NONE))) {
|
||||
xmlstr = switch_xml_toxml(xml);
|
||||
xmlstr = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, xmlstr));
|
||||
switch_xml_free(xml);
|
||||
free(xmlstr);
|
||||
@@ -1898,7 +1898,7 @@ static JSBool session_cdr(JSContext * cx, JSObject * obj, uintN argc, jsval * ar
|
||||
|
||||
if (switch_ivr_generate_xml_cdr(jss->session, &cdr) == SWITCH_STATUS_SUCCESS) {
|
||||
char *xml_text;
|
||||
if ((xml_text = switch_xml_toxml(cdr))) {
|
||||
if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
|
||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, xml_text));
|
||||
}
|
||||
switch_safe_free(xml_text);
|
||||
|
||||
@@ -76,7 +76,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
|
||||
|
||||
if (switch_ivr_generate_xml_cdr(session, &cdr) == SWITCH_STATUS_SUCCESS) {
|
||||
/* build the XML */
|
||||
if (!(xml_text = switch_xml_toxml(cdr))) {
|
||||
if (!(xml_text = switch_xml_toxml(cdr, SWITCH_TRUE))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user