diff options
author | Justin Clarke Casey | 2008-04-20 18:19:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-20 18:19:34 +0000 |
commit | d3cd2b0ae498b67718af05bd1b6186c68ad4234f (patch) | |
tree | b1eb883a217bf5675ee05bf13be2a67a2ec80a05 /OpenSim/Grid/UserServer/UserLoginService.cs | |
parent | Removed some script engine noise from console (diff) | |
download | opensim-SC_OLD-d3cd2b0ae498b67718af05bd1b6186c68ad4234f.zip opensim-SC_OLD-d3cd2b0ae498b67718af05bd1b6186c68ad4234f.tar.gz opensim-SC_OLD-d3cd2b0ae498b67718af05bd1b6186c68ad4234f.tar.bz2 opensim-SC_OLD-d3cd2b0ae498b67718af05bd1b6186c68ad4234f.tar.xz |
* On grid mode, if the inventory service is responding but returning an empty response to a whole agent inventory request, then post an inventory login failure message.
IMO, this is better than allowing the agent to login with an apparantly blank inventory.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index d35a471..a3bc9f0 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -306,6 +306,7 @@ namespace OpenSim.Grid.UserServer | |||
306 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of agent {1}", | 306 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of agent {1}", |
307 | m_config.InventoryUrl, userID); | 307 | m_config.InventoryUrl, userID); |
308 | 308 | ||
309 | |||
309 | List<InventoryFolderBase> folders | 310 | List<InventoryFolderBase> folders |
310 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 311 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
311 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); | 312 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); |
@@ -355,26 +356,9 @@ namespace OpenSim.Grid.UserServer | |||
355 | } | 356 | } |
356 | else | 357 | else |
357 | { | 358 | { |
358 | m_log.Warn("[LOGIN]: The root inventory folder could still not be retrieved" + | 359 | throw new Exception( |
359 | " for user ID " + userID); | 360 | String.Format( |
360 | 361 | "A root inventory folder for {0} could not be retrieved from the inventory service", userID)); | |
361 | AgentInventory userInventory = new AgentInventory(); | ||
362 | userInventory.CreateRootFolder(userID); | ||
363 | |||
364 | ArrayList AgentInventoryArray = new ArrayList(); | ||
365 | Hashtable TempHash; | ||
366 | foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) | ||
367 | { | ||
368 | TempHash = new Hashtable(); | ||
369 | TempHash["name"] = InvFolder.FolderName; | ||
370 | TempHash["parent_id"] = InvFolder.ParentID.ToString(); | ||
371 | TempHash["version"] = (Int32) InvFolder.Version; | ||
372 | TempHash["type_default"] = (Int32) InvFolder.DefaultType; | ||
373 | TempHash["folder_id"] = InvFolder.FolderID.ToString(); | ||
374 | AgentInventoryArray.Add(TempHash); | ||
375 | } | ||
376 | |||
377 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); | ||
378 | } | 362 | } |
379 | } | 363 | } |
380 | } | 364 | } |