aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorMW2007-12-02 20:43:21 +0000
committerMW2007-12-02 20:43:21 +0000
commitac77c32453fdeffc03a5abbb6cbb037dfc1e7c0d (patch)
tree5f67d9619efa7fb3a346125dc01971ff1e766d9b /OpenSim/Framework/Communications/Cache
parentAdded some error handling (and console output) to BaseHttpServer. (diff)
downloadopensim-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 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs20
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs9
2 files changed, 25 insertions, 4 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))