diff options
author | MW | 2007-12-02 20:43:21 +0000 |
---|---|---|
committer | MW | 2007-12-02 20:43:21 +0000 |
commit | ac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d (patch) | |
tree | 5f67d9619efa7fb3a346125dc01971ff1e766d9b /OpenSim | |
parent | Added some error handling (and console output) to BaseHttpServer. (diff) | |
download | opensim-SC_OLD-ac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d.zip opensim-SC_OLD-ac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d.tar.gz opensim-SC_OLD-ac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d.tar.bz2 opensim-SC_OLD-ac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d.tar.xz |
Attempt to fix mantis issue #82, taking prims into inventory and then rezzing them in another region.
Diffstat (limited to '')
5 files changed, 29 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 8fbc3fd..81ee29b 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -55,14 +55,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
55 | } | 55 | } |
56 | else if (RootFolder.folderID == folderInfo.parentID) | 56 | else if (RootFolder.folderID == folderInfo.parentID) |
57 | { | 57 | { |
58 | RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo); | 58 | if (!RootFolder.SubFolders.ContainsKey(folderInfo.folderID)) |
59 | { | ||
60 | RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo); | ||
61 | } | ||
59 | } | 62 | } |
60 | else | 63 | else |
61 | { | 64 | { |
62 | InventoryFolderImpl folder = RootFolder.HasSubFolder(folderInfo.parentID); | 65 | InventoryFolderImpl folder = RootFolder.HasSubFolder(folderInfo.parentID); |
63 | if (folder != null) | 66 | if (folder != null) |
64 | { | 67 | { |
65 | folder.SubFolders.Add(folderInfo.folderID, folderInfo); | 68 | if (!folder.SubFolders.ContainsKey(folderInfo.folderID)) |
69 | { | ||
70 | folder.SubFolders.Add(folderInfo.folderID, folderInfo); | ||
71 | } | ||
66 | } | 72 | } |
67 | } | 73 | } |
68 | } | 74 | } |
@@ -74,14 +80,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
74 | { | 80 | { |
75 | if (itemInfo.parentFolderID == RootFolder.folderID) | 81 | if (itemInfo.parentFolderID == RootFolder.folderID) |
76 | { | 82 | { |
77 | RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); | 83 | if (!RootFolder.Items.ContainsKey(itemInfo.inventoryID)) |
84 | { | ||
85 | RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); | ||
86 | } | ||
78 | } | 87 | } |
79 | else | 88 | else |
80 | { | 89 | { |
81 | InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.parentFolderID); | 90 | InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.parentFolderID); |
82 | if (folder != null) | 91 | if (folder != null) |
83 | { | 92 | { |
84 | folder.Items.Add(itemInfo.inventoryID, itemInfo); | 93 | if (!folder.Items.ContainsKey(itemInfo.inventoryID)) |
94 | { | ||
95 | folder.Items.Add(itemInfo.inventoryID, itemInfo); | ||
96 | } | ||
85 | } | 97 | } |
86 | } | 98 | } |
87 | } | 99 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index b24d763..fb4c3a6 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -72,6 +72,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | public void UpdateUserInventory(LLUUID userID) | ||
76 | { | ||
77 | CachedUserInfo userInfo = GetUserDetails(userID); | ||
78 | if (userInfo != null) | ||
79 | { | ||
80 | RequestInventoryForUser(userID, userInfo); | ||
81 | } | ||
82 | } | ||
83 | |||
75 | public CachedUserInfo GetUserDetails(LLUUID userID) | 84 | public CachedUserInfo GetUserDetails(LLUUID userID) |
76 | { | 85 | { |
77 | if (m_userProfiles.ContainsKey(userID)) | 86 | if (m_userProfiles.ContainsKey(userID)) |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index baf5add..aa6d315 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -211,7 +211,7 @@ namespace OpenSim.Framework.Servers | |||
211 | else | 211 | else |
212 | { | 212 | { |
213 | System.Console.WriteLine("Handler not found for http request " +request.RawUrl); | 213 | System.Console.WriteLine("Handler not found for http request " +request.RawUrl); |
214 | responseString = "Error"; | 214 | responseString = "Error"; |
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 612930d..99d1b0f 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -106,6 +106,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
106 | request.ItemCallBack(userID, item); | 106 | request.ItemCallBack(userID, item); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | m_RequestingInventory.Remove(userID); | ||
109 | } | 110 | } |
110 | } | 111 | } |
111 | 112 | ||
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 2ef27fd..145e15a 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -425,6 +425,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
425 | 425 | ||
426 | public void MakeRootAgent(LLVector3 pos, bool isFlying) | 426 | public void MakeRootAgent(LLVector3 pos, bool isFlying) |
427 | { | 427 | { |
428 | |||
428 | m_newAvatar = true; | 429 | m_newAvatar = true; |
429 | m_isChildAgent = false; | 430 | m_isChildAgent = false; |
430 | 431 | ||
@@ -433,6 +434,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
433 | AddToPhysicalScene(); | 434 | AddToPhysicalScene(); |
434 | m_physicsActor.Flying = isFlying; | 435 | m_physicsActor.Flying = isFlying; |
435 | 436 | ||
437 | m_scene.CommsManager.UserProfileCacheService.UpdateUserInventory(m_uuid); | ||
436 | //if (!m_gotAllObjectsInScene) | 438 | //if (!m_gotAllObjectsInScene) |
437 | //{ | 439 | //{ |
438 | //m_scene.SendAllSceneObjectsToClient(this); | 440 | //m_scene.SendAllSceneObjectsToClient(this); |