aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/OspResolver.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/OspResolver.cs b/OpenSim/Framework/Communications/OspResolver.cs
index 4627e30..924a4a9 100644
--- a/OpenSim/Framework/Communications/OspResolver.cs
+++ b/OpenSim/Framework/Communications/OspResolver.cs
@@ -105,6 +105,16 @@ namespace OpenSim.Framework.Communications
105 } 105 }
106 106
107 /// <summary> 107 /// <summary>
108 /// Hash a profile name into a UUID
109 /// </summary>
110 /// <param name="name"></param>
111 /// <returns></returns>
112 public static UUID HashName(string name)
113 {
114 return new UUID(Utils.MD5(Encoding.Unicode.GetBytes(name)), 0);
115 }
116
117 /// <summary>
108 /// Resolve an OSPI name by querying existing persistent user profiles. If there is no persistent user profile 118 /// Resolve an OSPI name by querying existing persistent user profiles. If there is no persistent user profile
109 /// then a temporary user profile is inserted in the cache. 119 /// then a temporary user profile is inserted in the cache.
110 /// </summary> 120 /// </summary>
@@ -133,7 +143,7 @@ namespace OpenSim.Framework.Communications
133 UserProfileData tempUserProfile = new UserProfileData(); 143 UserProfileData tempUserProfile = new UserProfileData();
134 tempUserProfile.FirstName = firstName; 144 tempUserProfile.FirstName = firstName;
135 tempUserProfile.SurName = lastName; 145 tempUserProfile.SurName = lastName;
136 tempUserProfile.ID = new UUID(Utils.MD5(Encoding.Unicode.GetBytes(tempUserProfile.Name)), 0); 146 tempUserProfile.ID = HashName(tempUserProfile.Name);
137 147
138 m_log.DebugFormat( 148 m_log.DebugFormat(
139 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); 149 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);