aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-20 19:07:42 +0000
committerJustin Clarke Casey2008-04-20 19:07:42 +0000
commitdcaf457bb82221a90d56e4be057766c898f5c2dd (patch)
treeb706d6b9b37dc055849fbf97095bd8175c5fb041 /OpenSim/Grid/UserServer/Main.cs
parent* Change lazy user inventory creation on first login to synchronous rather th... (diff)
downloadopensim-SC_OLD-dcaf457bb82221a90d56e4be057766c898f5c2dd.zip
opensim-SC_OLD-dcaf457bb82221a90d56e4be057766c898f5c2dd.tar.gz
opensim-SC_OLD-dcaf457bb82221a90d56e4be057766c898f5c2dd.tar.bz2
opensim-SC_OLD-dcaf457bb82221a90d56e4be057766c898f5c2dd.tar.xz
* Change user inventory create from explicit 'create user' command on the console from sync to async
* Catch more error conditions and provide more messages when things go wrong
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs36
1 files changed, 28 insertions, 8 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 19f037f..0f0104e 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -157,7 +157,9 @@ namespace OpenSim.Grid.UserServer
157 157
158 if (null != m_userManager.GetUserProfile(tempfirstname, templastname)) 158 if (null != m_userManager.GetUserProfile(tempfirstname, templastname))
159 { 159 {
160 m_log.ErrorFormat("[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); 160 m_log.ErrorFormat(
161 "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname);
162
161 break; 163 break;
162 } 164 }
163 165
@@ -166,22 +168,40 @@ namespace OpenSim.Grid.UserServer
166 LLUUID userID = new LLUUID(); 168 LLUUID userID = new LLUUID();
167 try 169 try
168 { 170 {
169 userID = 171 userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
170 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 172 }
171 } catch (Exception ex) 173 catch (Exception ex)
172 { 174 {
173 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); 175 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString());
174 } 176 }
175 177
176 try 178 try
177 { 179 {
178 RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", 180 bool created
179 userID.UUID); 181 = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
182 "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
183
184 if (!created)
185 {
186 throw new Exception(
187 String.Format(
188 "The inventory creation request for user {0} did not succeed."
189 + " Please contact your inventory service provider for more information.",
190 userID));
191 }
192
193 }
194 catch (System.Net.WebException e)
195 {
196 m_log.ErrorFormat(
197 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}",
198 m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
180 } 199 }
181 catch (Exception ex) 200 catch (Exception e)
182 { 201 {
183 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", ex.ToString()); 202 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e);
184 } 203 }
204
185 m_lastCreatedUser = userID; 205 m_lastCreatedUser = userID;
186 break; 206 break;
187 } 207 }