Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (14579 => 14580)
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c 2009-08-20 17:41:48 UTC (rev 14579)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c 2009-08-20 18:52:48 UTC (rev 14580)
@@ -253,9 +253,18 @@
int argc;
int i;
- if (!r || !r->requestInfo.user)
+ if (!r) {
return FALSE;
+ }
+ if (switch_strlen_zero(globals.realm) && switch_strlen_zero(globals.user)) {
+ return TRUE;
+ }
+
+ if (!r->requestInfo.user) {
+ return FALSE;
+ }
+
user = strdup(r->requestInfo.user);
if ((dp = strchr(user, '@'))) {
@@ -263,16 +272,17 @@
domain_name = dp;
}
+ if (!switch_strlen_zero(globals.realm) && !switch_strlen_zero(globals.user) && !strcmp(user, globals.user)) {
+ switch_safe_free(user);
+ return TRUE;
+ }
+
if (switch_strlen_zero(user) || switch_strlen_zero(domain_name)) {
switch_safe_free(user);
return FALSE;
}
+
- if (!switch_strlen_zero(globals.realm) && !switch_strlen_zero(globals.user) && !strcmp(user, globals.user)) {
- switch_safe_free(user);
- return TRUE;
- }
-
if (!user_attributes (user, domain_name, NULL, NULL, NULL, &allowed_commands)) {
switch_safe_free(user);
return FALSE;