aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserLoginService.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/UserLoginService.cs
parent* Change lazy user inventory creation on first login to synchronous rather th... (diff)
downloadopensim-SC-dcaf457bb82221a90d56e4be057766c898f5c2dd.zip
opensim-SC-dcaf457bb82221a90d56e4be057766c898f5c2dd.tar.gz
opensim-SC-dcaf457bb82221a90d56e4be057766c898f5c2dd.tar.bz2
opensim-SC-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/UserLoginService.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index e71a2cc..eb548a5 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -310,14 +310,15 @@ namespace OpenSim.Grid.UserServer
310 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 310 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
311 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); 311 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID);
312 312
313 // In theory, the user will only ever be missing a root folder in situations where a grid
314 // which didn't previously run a grid wide inventory server is being transitioned to one
315 // which does.
316 if (null == folders || folders.Count == 0) 313 if (null == folders || folders.Count == 0)
317 { 314 {
318 m_log.InfoFormat( 315 m_log.InfoFormat(
319 "[LOGIN]: A root inventory folder for user {0} was not found. Requesting creation.", userID); 316 "[LOGIN]: A root inventory folder for user {0} was not found. Requesting creation.", userID);
320 317
318 // Although the create user function creates a new agent inventory along with a new user profile, some
319 // tools are creating the user profile directly in the database without creating the inventory. At
320 // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already
321 // exist.
321 bool created = 322 bool created =
322 SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( 323 SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
323 "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); 324 "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID);
@@ -340,6 +341,7 @@ namespace OpenSim.Grid.UserServer
340 LLUUID rootID = LLUUID.Zero; 341 LLUUID rootID = LLUUID.Zero;
341 ArrayList AgentInventoryArray = new ArrayList(); 342 ArrayList AgentInventoryArray = new ArrayList();
342 Hashtable TempHash; 343 Hashtable TempHash;
344
343 foreach (InventoryFolderBase InvFolder in folders) 345 foreach (InventoryFolderBase InvFolder in folders)
344 { 346 {
345// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); 347// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name);
@@ -356,6 +358,7 @@ namespace OpenSim.Grid.UserServer
356 TempHash["folder_id"] = InvFolder.ID.ToString(); 358 TempHash["folder_id"] = InvFolder.ID.ToString();
357 AgentInventoryArray.Add(TempHash); 359 AgentInventoryArray.Add(TempHash);
358 } 360 }
361
359 return new InventoryData(AgentInventoryArray, rootID); 362 return new InventoryData(AgentInventoryArray, rootID);
360 } 363 }
361 else 364 else