fix MODAPP-126

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9287 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-08-13 17:24:33 +00:00
parent ea5679f8f2
commit a3e6f8f68f
3 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -994,6 +994,7 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
if ((profiles = switch_xml_child(cfg, "profiles"))) {
for (xprofile = switch_xml_child(profiles, "profile"); xprofile; xprofile = xprofile->next) {
char *xprofilename = (char *) switch_xml_attr_soft(xprofile, "name");
char *xprofiledomain = (char *) switch_xml_attr(xprofile, "domain");
if (strcasecmp(profile->name, xprofilename)) {
continue;
@@ -1004,6 +1005,10 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
profile->acl_count = 0;
profile->pflags |= PFLAG_STUN_ENABLED;
if (xprofiledomain) {
profile->domain_name = switch_core_strdup(profile->pool, xprofiledomain);
}
if ((settings = switch_xml_child(xprofile, "settings"))) {
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
@@ -1377,8 +1382,6 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (xprofiledomain) {
profile->domain_name = switch_core_strdup(profile->pool, xprofiledomain);
} else {
profile->domain_name = profile->name;
}
profile->dbname = switch_core_strdup(profile->pool, url);