diff options
author | Justin Clarke Casey | 2008-03-30 00:45:04 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-30 00:45:04 +0000 |
commit | 2fddd775f48d9261772f804f0396bb24768afae7 (patch) | |
tree | 6bddde4283c587e4a1a1ec9b9ec249d3fc02c4f0 /OpenSim/Grid | |
parent | * Refactor: Remove unused inventory methods, some of which weren't properly i... (diff) | |
download | opensim-SC-2fddd775f48d9261772f804f0396bb24768afae7.zip opensim-SC-2fddd775f48d9261772f804f0396bb24768afae7.tar.gz opensim-SC-2fddd775f48d9261772f804f0396bb24768afae7.tar.bz2 opensim-SC-2fddd775f48d9261772f804f0396bb24768afae7.tar.xz |
* Stop the grid inventory service sending all folder and item details twice
* This change will have no functional impact - we were already filtering out the dupes on the other end.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/InventoryServer/GridInventoryService.cs | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index a003cd3..681e8bb 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -46,22 +46,8 @@ namespace OpenSim.Grid.InventoryServer | |||
46 | private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, | 46 | private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, |
47 | out List<InventoryItemBase> itemsList) | 47 | out List<InventoryItemBase> itemsList) |
48 | { | 48 | { |
49 | List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID); | 49 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); |
50 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); | 50 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); |
51 | List<InventoryFolderBase> allFolders = new List<InventoryFolderBase>(); | ||
52 | |||
53 | if (rootFolders != null) | ||
54 | { | ||
55 | allFolders.InsertRange(0, rootFolders); | ||
56 | foreach (InventoryFolderBase subfolder in rootFolders) | ||
57 | { | ||
58 | List<InventoryFolderBase> subFolders = GetAllFolders(subfolder.folderID); | ||
59 | if (subFolders != null) | ||
60 | { | ||
61 | allFolders.InsertRange(0, subFolders); | ||
62 | } | ||
63 | } | ||
64 | } | ||
65 | 51 | ||
66 | foreach (InventoryFolderBase folder in allFolders) | 52 | foreach (InventoryFolderBase folder in allFolders) |
67 | { | 53 | { |
@@ -108,7 +94,7 @@ namespace OpenSim.Grid.InventoryServer | |||
108 | { | 94 | { |
109 | LLUUID userID = new LLUUID(rawUserID); | 95 | LLUUID userID = new LLUUID(rawUserID); |
110 | 96 | ||
111 | m_log.Info("[GRID INVENTORY]: Request for inventory of " + userID.ToString()); | 97 | m_log.Info("[AGENT INVENTORY]: Processing request for inventory of " + userID.ToString()); |
112 | 98 | ||
113 | InventoryCollection invCollection = new InventoryCollection(); | 99 | InventoryCollection invCollection = new InventoryCollection(); |
114 | List<InventoryFolderBase> folders; | 100 | List<InventoryFolderBase> folders; |
@@ -123,14 +109,14 @@ namespace OpenSim.Grid.InventoryServer | |||
123 | // foreach (InventoryFolderBase folder in folders) | 109 | // foreach (InventoryFolderBase folder in folders) |
124 | // { | 110 | // { |
125 | // m_log.DebugFormat( | 111 | // m_log.DebugFormat( |
126 | // "[GRID INVENTORY]: Sending back folder {0}, {1}", | 112 | // "[AGENT INVENTORY]: Sending back folder {0}, {1}", |
127 | // folder.name, folder.folderID); | 113 | // folder.name, folder.folderID); |
128 | // } | 114 | // } |
129 | // | 115 | // |
130 | // foreach (InventoryItemBase item in allItems) | 116 | // foreach (InventoryItemBase item in allItems) |
131 | // { | 117 | // { |
132 | // m_log.DebugFormat( | 118 | // m_log.DebugFormat( |
133 | // "[GRID INVENTORY]: Sending back item {0}, {1}, folder {2}", | 119 | // "[AGENT INVENTORY]: Sending back item {0}, {1}, folder {2}", |
134 | // item.inventoryName, item.inventoryID, item.parentFolderID); | 120 | // item.inventoryName, item.inventoryID, item.parentFolderID); |
135 | // } | 121 | // } |
136 | 122 | ||
@@ -153,7 +139,7 @@ namespace OpenSim.Grid.InventoryServer | |||
153 | LLUUID userID = new LLUUID(rawUserID); | 139 | LLUUID userID = new LLUUID(rawUserID); |
154 | 140 | ||
155 | m_log.Info( | 141 | m_log.Info( |
156 | "[INVENTORY]: Creating new set of inventory folders for " + userID.ToString()); | 142 | "[AGENT INVENTORY]: Creating new set of inventory folders for " + userID.ToString()); |
157 | 143 | ||
158 | CreateNewUserInventory(userID); | 144 | CreateNewUserInventory(userID); |
159 | return true; | 145 | return true; |
@@ -179,7 +165,7 @@ namespace OpenSim.Grid.InventoryServer | |||
179 | { | 165 | { |
180 | // Right now, this actions act more like an update/insert combination than a simple create. | 166 | // Right now, this actions act more like an update/insert combination than a simple create. |
181 | m_log.Info( | 167 | m_log.Info( |
182 | "[INVENTORY]: " + | 168 | "[AGENT INVENTORY]: " + |
183 | "Updating in " + folder.parentID.ToString() | 169 | "Updating in " + folder.parentID.ToString() |
184 | + ", folder " + folder.name); | 170 | + ", folder " + folder.name); |
185 | 171 | ||
@@ -190,7 +176,7 @@ namespace OpenSim.Grid.InventoryServer | |||
190 | public bool MoveInventoryFolder(InventoryFolderBase folder) | 176 | public bool MoveInventoryFolder(InventoryFolderBase folder) |
191 | { | 177 | { |
192 | m_log.Info( | 178 | m_log.Info( |
193 | "[INVENTORY]: " + | 179 | "[AGENT INVENTORY]: " + |
194 | "Moving folder " + folder.folderID | 180 | "Moving folder " + folder.folderID |
195 | + " to " + folder.parentID.ToString()); | 181 | + " to " + folder.parentID.ToString()); |
196 | 182 | ||
@@ -202,7 +188,7 @@ namespace OpenSim.Grid.InventoryServer | |||
202 | { | 188 | { |
203 | // Right now, this actions act more like an update/insert combination than a simple create. | 189 | // Right now, this actions act more like an update/insert combination than a simple create. |
204 | m_log.Info( | 190 | m_log.Info( |
205 | "[INVENTORY]: " + | 191 | "[AGENT INVENTORY]: " + |
206 | "Updating in " + item.parentFolderID.ToString() | 192 | "Updating in " + item.parentFolderID.ToString() |
207 | + ", item " + item.inventoryName); | 193 | + ", item " + item.inventoryName); |
208 | 194 | ||
@@ -214,7 +200,7 @@ namespace OpenSim.Grid.InventoryServer | |||
214 | { | 200 | { |
215 | // extra spaces to align with other inventory messages | 201 | // extra spaces to align with other inventory messages |
216 | m_log.Info( | 202 | m_log.Info( |
217 | "[INVENTORY]: " + | 203 | "[AGENT INVENTORY]: " + |
218 | "Deleting in " + item.parentFolderID.ToString() | 204 | "Deleting in " + item.parentFolderID.ToString() |
219 | + ", item " + item.inventoryName); | 205 | + ", item " + item.inventoryName); |
220 | 206 | ||