diff options
author | Diva Canto | 2012-04-07 14:52:15 -0700 |
---|---|---|
committer | Diva Canto | 2012-04-07 14:52:15 -0700 |
commit | d4a370a5f2b010727b1a2fdcc6526b7b13c72962 (patch) | |
tree | 68b0acd95eab9a413380e928afce1ca580628097 | |
parent | Added gatekeeper and uas addresses to grid info, so that viewers can take adv... (diff) | |
download | opensim-SC_OLD-d4a370a5f2b010727b1a2fdcc6526b7b13c72962.zip opensim-SC_OLD-d4a370a5f2b010727b1a2fdcc6526b7b13c72962.tar.gz opensim-SC_OLD-d4a370a5f2b010727b1a2fdcc6526b7b13c72962.tar.bz2 opensim-SC_OLD-d4a370a5f2b010727b1a2fdcc6526b7b13c72962.tar.xz |
A few more minor improvements on Suitcase inventory service.
-rw-r--r-- | OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 6a6181a..53fbea6 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -107,7 +107,6 @@ namespace OpenSim.Services.HypergridService | |||
107 | public override List<InventoryFolderBase> GetInventorySkeleton(UUID principalID) | 107 | public override List<InventoryFolderBase> GetInventorySkeleton(UUID principalID) |
108 | { | 108 | { |
109 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); | 109 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); |
110 | XInventoryFolder root = GetRootXFolder(principalID); | ||
111 | 110 | ||
112 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); | 111 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); |
113 | if (tree == null || (tree != null && tree.Count == 0)) | 112 | if (tree == null || (tree != null && tree.Count == 0)) |
@@ -119,7 +118,7 @@ namespace OpenSim.Services.HypergridService | |||
119 | folders.Add(ConvertToOpenSim(x)); | 118 | folders.Add(ConvertToOpenSim(x)); |
120 | } | 119 | } |
121 | 120 | ||
122 | SetAsNormalFolder(suitcase, root); | 121 | SetAsNormalFolder(suitcase); |
123 | folders.Add(ConvertToOpenSim(suitcase)); | 122 | folders.Add(ConvertToOpenSim(suitcase)); |
124 | 123 | ||
125 | return folders; | 124 | return folders; |
@@ -134,12 +133,11 @@ namespace OpenSim.Services.HypergridService | |||
134 | userInventory.Items = new List<InventoryItemBase>(); | 133 | userInventory.Items = new List<InventoryItemBase>(); |
135 | 134 | ||
136 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); | 135 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); |
137 | XInventoryFolder root = GetRootXFolder(userID); | ||
138 | 136 | ||
139 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); | 137 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); |
140 | if (tree == null || (tree != null && tree.Count == 0)) | 138 | if (tree == null || (tree != null && tree.Count == 0)) |
141 | { | 139 | { |
142 | SetAsNormalFolder(suitcase, root); | 140 | SetAsNormalFolder(suitcase); |
143 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | 141 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); |
144 | return userInventory; | 142 | return userInventory; |
145 | } | 143 | } |
@@ -164,7 +162,7 @@ namespace OpenSim.Services.HypergridService | |||
164 | userInventory.Items.AddRange(items); | 162 | userInventory.Items.AddRange(items); |
165 | } | 163 | } |
166 | 164 | ||
167 | SetAsNormalFolder(suitcase, root); | 165 | SetAsNormalFolder(suitcase); |
168 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | 166 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); |
169 | 167 | ||
170 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetUserInventory for user {0} returning {1} folders and {2} items", | 168 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetUserInventory for user {0} returning {1} folders and {2} items", |
@@ -181,6 +179,7 @@ namespace OpenSim.Services.HypergridService | |||
181 | if (root == null) | 179 | if (root == null) |
182 | { | 180 | { |
183 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID); | 181 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID); |
182 | return null; | ||
184 | } | 183 | } |
185 | 184 | ||
186 | // Warp! Root folder for travelers is the suitcase folder | 185 | // Warp! Root folder for travelers is the suitcase folder |
@@ -200,7 +199,7 @@ namespace OpenSim.Services.HypergridService | |||
200 | CreateSystemFolders(principalID, suitcase.folderID); | 199 | CreateSystemFolders(principalID, suitcase.folderID); |
201 | } | 200 | } |
202 | 201 | ||
203 | SetAsNormalFolder(suitcase, root); | 202 | SetAsNormalFolder(suitcase); |
204 | 203 | ||
205 | return ConvertToOpenSim(suitcase); | 204 | return ConvertToOpenSim(suitcase); |
206 | } | 205 | } |
@@ -484,7 +483,7 @@ namespace OpenSim.Services.HypergridService | |||
484 | return null; | 483 | return null; |
485 | } | 484 | } |
486 | 485 | ||
487 | private void SetAsNormalFolder(XInventoryFolder suitcase, XInventoryFolder root) | 486 | private void SetAsNormalFolder(XInventoryFolder suitcase) |
488 | { | 487 | { |
489 | suitcase.type = (short)AssetType.Folder; | 488 | suitcase.type = (short)AssetType.Folder; |
490 | } | 489 | } |