aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-24 16:50:31 +0100
committerJustin Clark-Casey (justincc)2010-08-24 16:50:31 +0100
commit289c21099cf3ce0a2e3392436541b67d0961d8e8 (patch)
treec6f94eeb0c4f1fc98c2ddef7c855a97dc408c908 /OpenSim/Region/CoreModules
parentAdd system lookup folder fix to the RemoveXInventoryServiceConnector as well ... (diff)
downloadopensim-SC-289c21099cf3ce0a2e3392436541b67d0961d8e8.zip
opensim-SC-289c21099cf3ce0a2e3392436541b67d0961d8e8.tar.gz
opensim-SC-289c21099cf3ce0a2e3392436541b67d0961d8e8.tar.bz2
opensim-SC-289c21099cf3ce0a2e3392436541b67d0961d8e8.tar.xz
Add automated test at the opensim 'api' level to check that a given item goes to the correct directory
Also removes some mono compiler warnings
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs17
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs7
2 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 350ad66..915b59e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -218,24 +218,35 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
218 218
219 public bool AddItem(InventoryItemBase item) 219 public bool AddItem(InventoryItemBase item)
220 { 220 {
221 m_log.DebugFormat( 221// m_log.DebugFormat(
222 "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", 222// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
223 item.Name, item.Owner, item.Folder); 223// item.Name, item.Owner, item.Folder);
224 224
225 if (UUID.Zero == item.Folder) 225 if (UUID.Zero == item.Folder)
226 { 226 {
227 InventoryFolderBase f = m_InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType); 227 InventoryFolderBase f = m_InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType);
228 if (f != null) 228 if (f != null)
229 { 229 {
230// m_log.DebugFormat(
231// "[LOCAL INVENTORY SERVICES CONNECTOR]: Found folder {0} type {1} for item {2}",
232// f.Name, (AssetType)f.Type, item.Name);
233
230 item.Folder = f.ID; 234 item.Folder = f.ID;
231 } 235 }
232 else 236 else
233 { 237 {
234 f = m_InventoryService.GetRootFolder(item.Owner); 238 f = m_InventoryService.GetRootFolder(item.Owner);
235 if (f != null) 239 if (f != null)
240 {
236 item.Folder = f.ID; 241 item.Folder = f.ID;
242 }
237 else 243 else
244 {
245// m_log.WarnFormat(
246// "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find root folder for {0} when trying to add item {1} with no parent folder specified",
247// item.Owner, item.Name);
238 return false; 248 return false;
249 }
239 } 250 }
240 } 251 }
241 252
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index 7ac3bb9..4211fa9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -240,9 +240,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
240 { 240 {
241 f = m_RemoteConnector.GetRootFolder(item.Owner); 241 f = m_RemoteConnector.GetRootFolder(item.Owner);
242 if (f != null) 242 if (f != null)
243 {
243 item.Folder = f.ID; 244 item.Folder = f.ID;
245 }
244 else 246 else
247 {
248 m_log.WarnFormat(
249 "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find root folder for {0} when trying to add item {1} with no parent folder specified",
250 item.Owner, item.Name);
245 return false; 251 return false;
252 }
246 } 253 }
247 } 254 }
248 255