mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-17 21:33:21 +00:00
potential xml root readlock issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11977 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
294e788056
commit
4e2ae22d67
@ -347,8 +347,10 @@ SWITCH_STANDARD_API(user_data_function)
|
|||||||
if ((domain = strchr(user, '@'))) {
|
if ((domain = strchr(user, '@'))) {
|
||||||
*domain++ = '\0';
|
*domain++ = '\0';
|
||||||
} else {
|
} else {
|
||||||
|
if (!(domain = switch_core_get_variable("domain"))) {
|
||||||
domain = "cluecon.com";
|
domain = "cluecon.com";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
|
switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
|
||||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "user", user);
|
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "user", user);
|
||||||
@ -465,15 +467,16 @@ static switch_status_t _find_user(const char *cmd, switch_core_session_t *sessio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xml && x_user) {
|
if (x_user) {
|
||||||
xmlstr = switch_xml_toxml(x_user, SWITCH_FALSE);
|
xmlstr = switch_xml_toxml(x_user, SWITCH_FALSE);
|
||||||
switch_assert(xmlstr);
|
switch_assert(xmlstr);
|
||||||
|
|
||||||
stream->write_function(stream, "%s", xmlstr);
|
stream->write_function(stream, "%s", xmlstr);
|
||||||
free(xmlstr);
|
free(xmlstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch_xml_free(xml);
|
switch_xml_free(xml);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
free(mydata);
|
free(mydata);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
@ -683,18 +686,17 @@ SWITCH_STANDARD_API(xml_locate_function)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xml && obj) {
|
if (obj) {
|
||||||
xmlstr = switch_xml_toxml(obj, SWITCH_FALSE);
|
xmlstr = switch_xml_toxml(obj, SWITCH_FALSE);
|
||||||
switch_assert(xmlstr);
|
switch_assert(xmlstr);
|
||||||
|
|
||||||
stream->write_function(stream, "%s", xmlstr);
|
stream->write_function(stream, "%s", xmlstr);
|
||||||
free(xmlstr);
|
free(xmlstr);
|
||||||
switch_xml_free(xml);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_xml_free(xml);
|
||||||
switch_event_destroy(¶ms);
|
switch_event_destroy(¶ms);
|
||||||
free(mydata);
|
free(mydata);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2391,9 +2391,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
||||||
if (xml) {
|
|
||||||
switch_xml_free(xml);
|
switch_xml_free(xml);
|
||||||
}
|
|
||||||
|
|
||||||
if (params) {
|
if (params) {
|
||||||
switch_event_destroy(¶ms);
|
switch_event_destroy(¶ms);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user