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:
Anthony Minessale
2008-01-23 20:59:25 +00:00
parent 14ba0b9999
commit 1424b6c73b
16 changed files with 286 additions and 103 deletions
+10 -4
View File
@@ -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(&params, 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(&params);
if (xml) {
switch_xml_free(xml);
}