mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
change xml_lookups to take an event as params instead of url string this will break your xml_curl scripts please update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7333 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -828,7 +828,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
sofia_profile_t *profile = NULL;
|
||||
char url[512] = "";
|
||||
int profile_found = 0;
|
||||
|
||||
switch_event_t *params = NULL;;
|
||||
|
||||
if (!reload) {
|
||||
su_init();
|
||||
if (sip_update_default_mclass(sip_extend_mclass(NULL)) < 0) {
|
||||
@@ -847,9 +848,11 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
return status;
|
||||
}
|
||||
|
||||
switch_snprintf(url, sizeof(url), "profile=%s", switch_str_nil(profile_name));
|
||||
|
||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, url))) {
|
||||
switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
|
||||
switch_assert(params);
|
||||
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "profile", profile_name);
|
||||
|
||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, params))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
goto done;
|
||||
@@ -1279,6 +1282,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
}
|
||||
}
|
||||
done:
|
||||
|
||||
switch_event_destroy(¶ms);
|
||||
|
||||
if (xml) {
|
||||
switch_xml_free(xml);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user