diff options
author | Adam Frisby | 2008-05-01 18:04:42 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 18:04:42 +0000 |
commit | 20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch) | |
tree | 52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Grid/InventoryServer/GridInventoryService.cs | |
parent | More config cleanup in LaunchSLClient. (diff) | |
download | opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2 opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz |
* Rolled back a few changes.
Diffstat (limited to 'OpenSim/Grid/InventoryServer/GridInventoryService.cs')
-rw-r--r-- | OpenSim/Grid/InventoryServer/GridInventoryService.cs | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index c3e3a28..db9a864 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Grid.InventoryServer | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class GridInventoryService : InventoryServiceBase | 41 | public class GridInventoryService : InventoryServiceBase |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) | 46 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) |
@@ -55,7 +55,7 @@ namespace OpenSim.Grid.InventoryServer | |||
55 | /// <param name="itemsList"></param> | 55 | /// <param name="itemsList"></param> |
56 | /// <returns>true if the inventory was retrieved, false otherwise</returns> | 56 | /// <returns>true if the inventory was retrieved, false otherwise</returns> |
57 | private bool GetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, | 57 | private bool GetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, |
58 | out List<InventoryItemBase> itemsList) | 58 | out List<InventoryItemBase> itemsList) |
59 | { | 59 | { |
60 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); | 60 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); |
61 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); | 61 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); |
@@ -109,28 +109,28 @@ namespace OpenSim.Grid.InventoryServer | |||
109 | { | 109 | { |
110 | // uncomment me to simulate an overloaded inventory server | 110 | // uncomment me to simulate an overloaded inventory server |
111 | //Thread.Sleep(20000); | 111 | //Thread.Sleep(20000); |
112 | 112 | ||
113 | LLUUID userID = new LLUUID(rawUserID); | 113 | LLUUID userID = new LLUUID(rawUserID); |
114 | 114 | ||
115 | m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); | 115 | m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); |
116 | 116 | ||
117 | InventoryCollection invCollection = new InventoryCollection(); | 117 | InventoryCollection invCollection = new InventoryCollection(); |
118 | 118 | ||
119 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); | 119 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); |
120 | 120 | ||
121 | if (null == allFolders) | 121 | if (null == allFolders) |
122 | { | 122 | { |
123 | m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); | 123 | m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); |
124 | 124 | ||
125 | return invCollection; | 125 | return invCollection; |
126 | } | 126 | } |
127 | 127 | ||
128 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); | 128 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); |
129 | 129 | ||
130 | foreach (InventoryFolderBase folder in allFolders) | 130 | foreach (InventoryFolderBase folder in allFolders) |
131 | { | 131 | { |
132 | List<InventoryItemBase> items = RequestFolderItems(folder.ID); | 132 | List<InventoryItemBase> items = RequestFolderItems(folder.ID); |
133 | 133 | ||
134 | if (items != null) | 134 | if (items != null) |
135 | { | 135 | { |
136 | allItems.InsertRange(0, items); | 136 | allItems.InsertRange(0, items); |
@@ -138,9 +138,9 @@ namespace OpenSim.Grid.InventoryServer | |||
138 | } | 138 | } |
139 | 139 | ||
140 | invCollection.UserID = userID; | 140 | invCollection.UserID = userID; |
141 | invCollection.Folders = allFolders; | 141 | invCollection.Folders = allFolders; |
142 | invCollection.Items = allItems; | 142 | invCollection.Items = allItems; |
143 | 143 | ||
144 | // foreach (InventoryFolderBase folder in invCollection.Folders) | 144 | // foreach (InventoryFolderBase folder in invCollection.Folders) |
145 | // { | 145 | // { |
146 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); | 146 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); |
@@ -150,14 +150,14 @@ namespace OpenSim.Grid.InventoryServer | |||
150 | // { | 150 | // { |
151 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); | 151 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); |
152 | // } | 152 | // } |
153 | 153 | ||
154 | m_log.InfoFormat( | 154 | m_log.InfoFormat( |
155 | "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", | 155 | "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", |
156 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); | 156 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); |
157 | 157 | ||
158 | return invCollection; | 158 | return invCollection; |
159 | } | 159 | } |
160 | 160 | ||
161 | /// <summary> | 161 | /// <summary> |
162 | /// Guid to UUID wrapper for same name IInventoryServices method | 162 | /// Guid to UUID wrapper for same name IInventoryServices method |
163 | /// </summary> | 163 | /// </summary> |
@@ -166,10 +166,10 @@ namespace OpenSim.Grid.InventoryServer | |||
166 | public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) | 166 | public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) |
167 | { | 167 | { |
168 | //Thread.Sleep(10000); | 168 | //Thread.Sleep(10000); |
169 | 169 | ||
170 | LLUUID userID = new LLUUID(rawUserID); | 170 | LLUUID userID = new LLUUID(rawUserID); |
171 | return GetInventorySkeleton(userID); | 171 | return GetInventorySkeleton(userID); |
172 | } | 172 | } |
173 | 173 | ||
174 | /// <summary> | 174 | /// <summary> |
175 | /// Create an inventory for the given user. | 175 | /// Create an inventory for the given user. |
@@ -196,11 +196,11 @@ namespace OpenSim.Grid.InventoryServer | |||
196 | { | 196 | { |
197 | MoveFolder(folder); | 197 | MoveFolder(folder); |
198 | } | 198 | } |
199 | 199 | ||
200 | public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder) | 200 | public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder) |
201 | { | 201 | { |
202 | PurgeFolder(folder); | 202 | PurgeFolder(folder); |
203 | } | 203 | } |
204 | 204 | ||
205 | public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) | 205 | public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) |
206 | { | 206 | { |
@@ -230,15 +230,15 @@ namespace OpenSim.Grid.InventoryServer | |||
230 | MoveExistingInventoryFolder(folder); | 230 | MoveExistingInventoryFolder(folder); |
231 | return true; | 231 | return true; |
232 | } | 232 | } |
233 | 233 | ||
234 | public bool PurgeInventoryFolder(InventoryFolderBase folder) | 234 | public bool PurgeInventoryFolder(InventoryFolderBase folder) |
235 | { | 235 | { |
236 | m_log.InfoFormat( | 236 | m_log.InfoFormat( |
237 | "[GRID AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); | 237 | "[GRID AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); |
238 | 238 | ||
239 | PurgeInventoryFolder(folder.Owner, folder); | 239 | PurgeInventoryFolder(folder.Owner, folder); |
240 | return true; | 240 | return true; |
241 | } | 241 | } |
242 | 242 | ||
243 | public bool AddInventoryItem(InventoryItemBase item) | 243 | public bool AddInventoryItem(InventoryItemBase item) |
244 | { | 244 | { |
@@ -267,4 +267,4 @@ namespace OpenSim.Grid.InventoryServer | |||
267 | return true; | 267 | return true; |
268 | } | 268 | } |
269 | } | 269 | } |
270 | } \ No newline at end of file | 270 | } |