diff options
author | Justin Clarke Casey | 2009-04-29 19:31:48 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-29 19:31:48 +0000 |
commit | 40c2e2e84f50e9a75f26b326a798a280d36687e9 (patch) | |
tree | 82487d81c2e8b403b67b2b6978414270df408bc8 /OpenSim/Framework/Communications/OspResolver.cs | |
parent | * Apply further groups xmlrpc to stop an exception in the exception handler (diff) | |
download | opensim-SC_OLD-40c2e2e84f50e9a75f26b326a798a280d36687e9.zip opensim-SC_OLD-40c2e2e84f50e9a75f26b326a798a280d36687e9.tar.gz opensim-SC_OLD-40c2e2e84f50e9a75f26b326a798a280d36687e9.tar.bz2 opensim-SC_OLD-40c2e2e84f50e9a75f26b326a798a280d36687e9.tar.xz |
* Add test to check temp profile creation on iar load
Diffstat (limited to 'OpenSim/Framework/Communications/OspResolver.cs')
-rw-r--r-- | OpenSim/Framework/Communications/OspResolver.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/OspResolver.cs b/OpenSim/Framework/Communications/OspResolver.cs index f246692..4627e30 100644 --- a/OpenSim/Framework/Communications/OspResolver.cs +++ b/OpenSim/Framework/Communications/OspResolver.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications | |||
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | public const string OSPA_PREFIX = "ospi:"; | 45 | public const string OSPA_PREFIX = "ospa:"; |
46 | public const string OSPA_NAME_KEY = "n"; | 46 | public const string OSPA_NAME_KEY = "n"; |
47 | public const string OSPA_NAME_VALUE_SEPARATOR = " "; | 47 | public const string OSPA_NAME_VALUE_SEPARATOR = " "; |
48 | public const string OSPA_TUPLE_SEPARATOR = "|"; | 48 | public const string OSPA_TUPLE_SEPARATOR = "|"; |
@@ -76,6 +76,8 @@ namespace OpenSim.Framework.Communications | |||
76 | /// </returns> | 76 | /// </returns> |
77 | public static string Resolve(string ospa, CommunicationsManager commsManager) | 77 | public static string Resolve(string ospa, CommunicationsManager commsManager) |
78 | { | 78 | { |
79 | m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); | ||
80 | |||
79 | if (!ospa.StartsWith(OSPA_PREFIX)) | 81 | if (!ospa.StartsWith(OSPA_PREFIX)) |
80 | return ospa; | 82 | return ospa; |
81 | 83 | ||
@@ -88,7 +90,7 @@ namespace OpenSim.Framework.Communications | |||
88 | 90 | ||
89 | if (tupleSeparatorIndex < 0) | 91 | if (tupleSeparatorIndex < 0) |
90 | { | 92 | { |
91 | m_log.WarnFormat("[OSPA RESOLVER]: Ignoring non-tuple component {0} in OSPA {1}", tuple, ospa); | 93 | m_log.WarnFormat("[OSP RESOLVER]: Ignoring non-tuple component {0} in OSPA {1}", tuple, ospa); |
92 | continue; | 94 | continue; |
93 | } | 95 | } |
94 | 96 | ||
@@ -117,7 +119,7 @@ namespace OpenSim.Framework.Communications | |||
117 | 119 | ||
118 | if (nameSeparatorIndex < 0) | 120 | if (nameSeparatorIndex < 0) |
119 | { | 121 | { |
120 | m_log.WarnFormat("[OSPA RESOLVER]: Ignoring unseparated name {0}", name); | 122 | m_log.WarnFormat("[OSP RESOLVER]: Ignoring unseparated name {0}", name); |
121 | return null; | 123 | return null; |
122 | } | 124 | } |
123 | 125 | ||
@@ -127,12 +129,14 @@ namespace OpenSim.Framework.Communications | |||
127 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); | 129 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); |
128 | if (userInfo != null) | 130 | if (userInfo != null) |
129 | return userInfo.UserProfile.ID.ToString(); | 131 | return userInfo.UserProfile.ID.ToString(); |
130 | 132 | ||
131 | UserProfileData tempUserProfile = new UserProfileData(); | 133 | UserProfileData tempUserProfile = new UserProfileData(); |
132 | tempUserProfile.FirstName = firstName; | 134 | tempUserProfile.FirstName = firstName; |
133 | tempUserProfile.SurName = lastName; | 135 | tempUserProfile.SurName = lastName; |
134 | tempUserProfile.ID = new UUID(Utils.MD5(Encoding.Unicode.GetBytes(tempUserProfile.Name)), 0); | 136 | tempUserProfile.ID = new UUID(Utils.MD5(Encoding.Unicode.GetBytes(tempUserProfile.Name)), 0); |
135 | 137 | ||
138 | m_log.DebugFormat( | ||
139 | "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); | ||
136 | commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); | 140 | commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); |
137 | 141 | ||
138 | return tempUserProfile.ID.ToString(); | 142 | return tempUserProfile.ID.ToString(); |