mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-19 05:58:29 +00:00
oops[]
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12471 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ff2cf9623e
commit
0d34288f0c
@ -41,7 +41,7 @@ SWITCH_DECLARE(switch_size_t) switch_event_import_xml(switch_xml_t xml, const ch
|
|||||||
|
|
||||||
if (!*event) {
|
if (!*event) {
|
||||||
switch_event_create(event, SWITCH_EVENT_REQUEST_PARAMS);
|
switch_event_create(event, SWITCH_EVENT_REQUEST_PARAMS);
|
||||||
switch_assert(event);
|
switch_assert(*event);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (node = xml; node; node = node->next) {
|
for (node = xml; node; node = node->next) {
|
||||||
@ -58,7 +58,7 @@ SWITCH_DECLARE(switch_size_t) switch_event_import_xml(switch_xml_t xml, const ch
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml_config_item_t *instructions)
|
SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml_config_item_t *instructions)
|
||||||
{
|
{
|
||||||
switch_event_t *event;
|
switch_event_t *event = NULL;
|
||||||
switch_status_t result;
|
switch_status_t result;
|
||||||
int count = switch_event_import_xml(xml, "name", "value", &event);
|
int count = switch_event_import_xml(xml, "name", "value", &event);
|
||||||
|
|
||||||
@ -165,14 +165,14 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
|
|||||||
/* We have a preallocated buffer */
|
/* We have a preallocated buffer */
|
||||||
char *dest = (char*)item->ptr;
|
char *dest = (char*)item->ptr;
|
||||||
|
|
||||||
if (strncasecmp(dest, newstring, string_options->length)) {
|
if (!dest || strncasecmp(dest, newstring, string_options->length)) {
|
||||||
switch_copy_string(dest, newstring, string_options->length);
|
switch_copy_string(dest, newstring, string_options->length);
|
||||||
changed = SWITCH_TRUE;
|
changed = SWITCH_TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char **dest = (char**)item->ptr;
|
char **dest = (char**)item->ptr;
|
||||||
|
|
||||||
if (strcasecmp(*dest, newstring)) {
|
if (!*dest || strcasecmp(*dest, newstring)) {
|
||||||
if (string_options->pool) {
|
if (string_options->pool) {
|
||||||
*dest = switch_core_strdup(string_options->pool, newstring);
|
*dest = switch_core_strdup(string_options->pool, newstring);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user