aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-30 19:57:07 +0000
committerJustin Clarke Casey2009-04-30 19:57:07 +0000
commite7078520db1622b4726a1b9e9c312002a48d474b (patch)
tree5fc8a27dc6ceb725d8a78c6a964062d0c655d099 /OpenSim/Framework
parentEstate owners who are not administrators, even in god mode, should not be (diff)
downloadopensim-SC_OLD-e7078520db1622b4726a1b9e9c312002a48d474b.zip
opensim-SC_OLD-e7078520db1622b4726a1b9e9c312002a48d474b.tar.gz
opensim-SC_OLD-e7078520db1622b4726a1b9e9c312002a48d474b.tar.bz2
opensim-SC_OLD-e7078520db1622b4726a1b9e9c312002a48d474b.tar.xz
* refactor: move iar name hashing into a method
Diffstat (limited to 'OpenSim/Framework')
-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);