From b497fbd5f82132057b8744a54c397cd29f7ccf92 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 8 Dec 2009 22:51:39 +0000 Subject: [PATCH] fix seg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15853 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c index 92667bf3d1..9fd61db596 100644 --- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c @@ -341,14 +341,18 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name) if (!domain_name) { if (globals.virtual_host) { - domain_name = (char *) r->requestInfo.host; - if (!strncasecmp(domain_name, "www.", 3)) { - domain_name += 4; + if ((domain_name = (char *) r->requestInfo.host)) { + if (!strncasecmp(domain_name, "www.", 3)) { + domain_name += 4; + } + } + } + if (!domain_name) { + if (globals.default_domain) { + domain_name = globals.default_domain; + } else { + domain_name = switch_core_get_variable("domain"); } - } else if (globals.default_domain) { - domain_name = globals.default_domain; - } else { - domain_name = switch_core_get_variable("domain"); } }