diff options
author | MW | 2008-06-28 17:52:06 +0000 |
---|---|---|
committer | MW | 2008-06-28 17:52:06 +0000 |
commit | 5cfc468d959f1fcfa1fa8121154a70c6430df083 (patch) | |
tree | 3af37f23260eb3d7e7e6d15284cf9c463ead27e2 /OpenSim | |
parent | Manti#1624. Thank you, Melanie for a patch that: (diff) | |
download | opensim-SC-5cfc468d959f1fcfa1fa8121154a70c6430df083.zip opensim-SC-5cfc468d959f1fcfa1fa8121154a70c6430df083.tar.gz opensim-SC-5cfc468d959f1fcfa1fa8121154a70c6430df083.tar.bz2 opensim-SC-5cfc468d959f1fcfa1fa8121154a70c6430df083.tar.xz |
more work on the support for multiple inventory servers.
The Login service should now read/create new inventory on the inventory server that is set in a users profile.
Also added "Add-InventoryHost" console command to add a support for a new server to a region.
So it would be good if someone could test this. Set up the grid as normal, but then also run extra inventory server on a different computer (well actually it just has to be on a different network hostname, so one using "http://localhost:8004" and one using "http://127.0.0.1:8005" should work) then you need to manually edit the user profile database to set the new servers url in a user's "userInventoryURI" field.
Then on a region server, use the Add-InventoryHost to add the new server url (always include the full url, including http, but don't add a final /)
Login with that account and see if the inventory works.
Of course these needs to be made more user friendly.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 6 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 2 |
4 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 08b071f..8fcb4f5 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications | |||
94 | /// <param name="userID"></param> | 94 | /// <param name="userID"></param> |
95 | /// <returns></returns> | 95 | /// <returns></returns> |
96 | /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> | 96 | /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> |
97 | protected abstract InventoryData GetInventorySkeleton(LLUUID userID); | 97 | protected abstract InventoryData GetInventorySkeleton(LLUUID userID, string inventoryServerUrl); |
98 | 98 | ||
99 | /// <summary> | 99 | /// <summary> |
100 | /// Called when we receive the client's initial XMLRPC login_to_simulator request message | 100 | /// Called when we receive the client's initial XMLRPC login_to_simulator request message |
@@ -230,7 +230,7 @@ namespace OpenSim.Framework.Communications | |||
230 | 230 | ||
231 | try | 231 | try |
232 | { | 232 | { |
233 | inventData = GetInventorySkeleton(agentID); | 233 | inventData = GetInventorySkeleton(agentID, userProfile.UserInventoryURI); |
234 | } | 234 | } |
235 | catch (Exception e) | 235 | catch (Exception e) |
236 | { | 236 | { |
@@ -386,7 +386,7 @@ namespace OpenSim.Framework.Communications | |||
386 | LLUUID agentID = userProfile.ID; | 386 | LLUUID agentID = userProfile.ID; |
387 | 387 | ||
388 | // Inventory Library Section | 388 | // Inventory Library Section |
389 | InventoryData inventData = GetInventorySkeleton(agentID); | 389 | InventoryData inventData = GetInventorySkeleton(agentID, userProfile.UserInventoryURI); |
390 | ArrayList AgentInventoryArray = inventData.InventoryArray; | 390 | ArrayList AgentInventoryArray = inventData.InventoryArray; |
391 | 391 | ||
392 | Hashtable InventoryRootHash = new Hashtable(); | 392 | Hashtable InventoryRootHash = new Hashtable(); |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 165700c..a4dce5e 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -419,15 +419,21 @@ namespace OpenSim.Grid.UserServer | |||
419 | } | 419 | } |
420 | 420 | ||
421 | // See LoginService | 421 | // See LoginService |
422 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 422 | protected override InventoryData GetInventorySkeleton(LLUUID userID, string serverUrl) |
423 | { | 423 | { |
424 | string invUrl = m_config.InventoryUrl; | ||
425 | if (serverUrl != String.Empty) | ||
426 | { | ||
427 | invUrl = serverUrl; | ||
428 | } | ||
429 | |||
424 | m_log.DebugFormat( | 430 | m_log.DebugFormat( |
425 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", | 431 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", |
426 | m_config.InventoryUrl, userID); | 432 | m_config.InventoryUrl, userID); |
427 | 433 | ||
428 | List<InventoryFolderBase> folders | 434 | List<InventoryFolderBase> folders |
429 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 435 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
430 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); | 436 | "POST", invUrl + "RootFolders/", userID.UUID); |
431 | 437 | ||
432 | if (null == folders || folders.Count == 0) | 438 | if (null == folders || folders.Count == 0) |
433 | { | 439 | { |
@@ -440,7 +446,7 @@ namespace OpenSim.Grid.UserServer | |||
440 | // exist. | 446 | // exist. |
441 | bool created = | 447 | bool created = |
442 | SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( | 448 | SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( |
443 | "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); | 449 | "POST", invUrl + "CreateInventory/", userID.UUID); |
444 | 450 | ||
445 | if (!created) | 451 | if (!created) |
446 | { | 452 | { |
@@ -456,7 +462,7 @@ namespace OpenSim.Grid.UserServer | |||
456 | } | 462 | } |
457 | 463 | ||
458 | folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 464 | folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
459 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); | 465 | "POST", invUrl + "RootFolders/", userID.UUID); |
460 | } | 466 | } |
461 | 467 | ||
462 | if (folders != null && folders.Count > 0) | 468 | if (folders != null && folders.Count > 0) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 8b42e2e..60e00a2 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -602,6 +602,13 @@ namespace OpenSim | |||
602 | } | 602 | } |
603 | 603 | ||
604 | break; | 604 | break; |
605 | |||
606 | case "Add-InventoryHost": | ||
607 | if (cmdparams.Length > 0) | ||
608 | { | ||
609 | m_commsManager.AddInventoryService(cmdparams[0]); | ||
610 | } | ||
611 | break; | ||
605 | default: | 612 | default: |
606 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; | 613 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; |
607 | cmdparams.CopyTo(tmpPluginArgs, 1); | 614 | cmdparams.CopyTo(tmpPluginArgs, 1); |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 5f4558d..30a639a 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -258,7 +258,7 @@ namespace OpenSim.Region.Communications.Local | |||
258 | } | 258 | } |
259 | 259 | ||
260 | // See LoginService | 260 | // See LoginService |
261 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 261 | protected override InventoryData GetInventorySkeleton(LLUUID userID, string serverUrl) |
262 | { | 262 | { |
263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); | 263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); |
264 | 264 | ||