aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2010-08-23 23:55:15 +0100
committerMelanie2010-08-23 23:55:15 +0100
commit1bfec00a88a11a13d62a32c0549bbf6e8aa1e69a (patch)
treecdb5556f5e7cbd3c846f2ed4e65479e48a5cc44f /OpenSim/Region/CoreModules
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentAdd system lookup folder fix to the RemoveXInventoryServiceConnector as well ... (diff)
downloadopensim-SC-1bfec00a88a11a13d62a32c0549bbf6e8aa1e69a.zip
opensim-SC-1bfec00a88a11a13d62a32c0549bbf6e8aa1e69a.tar.gz
opensim-SC-1bfec00a88a11a13d62a32c0549bbf6e8aa1e69a.tar.bz2
opensim-SC-1bfec00a88a11a13d62a32c0549bbf6e8aa1e69a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs11
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs3
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs27
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs1
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs22
8 files changed, 51 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index 1603c07..fc1afaf 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -223,4 +223,4 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
223 OnInstantMessage(null, msg); 223 OnInstantMessage(null, msg);
224 } 224 }
225 } 225 }
226} 226} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index e1ee0b1..a49faec 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -132,8 +132,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
132 { 132 {
133 UUID toAgentID = new UUID(im.toAgentID); 133 UUID toAgentID = new UUID(im.toAgentID);
134 134
135 //m_log.DebugFormat("[INSTANT MESSAGE]: Attempting delivery of IM from {0} to {1}", im.fromAgentName, toAgentID.ToString());
136
137 // Try root avatar only first 135 // Try root avatar only first
138 foreach (Scene scene in m_Scenes) 136 foreach (Scene scene in m_Scenes)
139 { 137 {
@@ -176,6 +174,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
176 } 174 }
177 } 175 }
178 176
177 m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
179 SendGridInstantMessageViaXMLRPC(im, result); 178 SendGridInstantMessageViaXMLRPC(im, result);
180 179
181 return; 180 return;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 4465e8a..a08a628 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -32,7 +32,6 @@ using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenSim.Framework; 34using OpenSim.Framework;
35
36using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 36using OpenSim.Region.Framework.Scenes;
38using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
@@ -92,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
92 m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>(); 91 m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
93 if (m_TransferModule == null) 92 if (m_TransferModule == null)
94 { 93 {
95 m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); 94 m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
96 m_Enabled = false; 95 m_Enabled = false;
97 96
98 m_Scenelist.Clear(); 97 m_Scenelist.Clear();
@@ -185,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
185 { 184 {
186 UUID folderID = new UUID(im.binaryBucket, 1); 185 UUID folderID = new UUID(im.binaryBucket, 1);
187 186
188 m_log.DebugFormat("[AGENT INVENTORY]: Inserting original folder {0} "+ 187 m_log.DebugFormat("[INVENTORY TRANSFER]: Inserting original folder {0} "+
189 "into agent {1}'s inventory", 188 "into agent {1}'s inventory",
190 folderID, new UUID(im.toAgentID)); 189 folderID, new UUID(im.toAgentID));
191 190
@@ -221,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
221 220
222 UUID itemID = new UUID(im.binaryBucket, 1); 221 UUID itemID = new UUID(im.binaryBucket, 1);
223 222
224 m_log.DebugFormat("[AGENT INVENTORY]: (giving) Inserting item {0} "+ 223 m_log.DebugFormat("[INVENTORY TRANSFER]: (giving) Inserting item {0} "+
225 "into agent {1}'s inventory", 224 "into agent {1}'s inventory",
226 itemID, new UUID(im.toAgentID)); 225 itemID, new UUID(im.toAgentID));
227 226
@@ -288,10 +287,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
288 // inventory is loaded. Courtesy of the above bulk update, 287 // inventory is loaded. Courtesy of the above bulk update,
289 // It will have been pushed to the client, too 288 // It will have been pushed to the client, too
290 // 289 //
291
292 //CachedUserInfo userInfo =
293 // scene.CommsManager.UserProfileCacheService.
294 // GetUserDetails(client.AgentId);
295 IInventoryService invService = scene.InventoryService; 290 IInventoryService invService = scene.InventoryService;
296 291
297 InventoryFolderBase trashFolder = 292 InventoryFolderBase trashFolder =
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
index 1e51187..dcf08e3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
@@ -27,15 +27,12 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30
31using OpenMetaverse; 30using OpenMetaverse;
32using Nini.Config; 31using Nini.Config;
33using log4net; 32using log4net;
34
35using OpenSim.Framework; 33using OpenSim.Framework;
36using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
37 35
38
39namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory 36namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
40{ 37{
41 public abstract class BaseInventoryConnector : IInventoryService 38 public abstract class BaseInventoryConnector : IInventoryService
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
index c97ab9e..4e2f602 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
@@ -161,6 +161,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
161 /// <returns></returns> 161 /// <returns></returns>
162 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) 162 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
163 { 163 {
164 m_log.DebugFormat("[INVENTORY CACHE]: Getting folder for asset type {0} for user {1}", type, userID);
165
164 Dictionary<AssetType, InventoryFolderBase> folders = null; 166 Dictionary<AssetType, InventoryFolderBase> folders = null;
165 167
166 lock (m_InventoryCache) 168 lock (m_InventoryCache)
@@ -177,8 +179,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
177 179
178 if ((folders != null) && folders.ContainsKey(type)) 180 if ((folders != null) && folders.ContainsKey(type))
179 { 181 {
182 m_log.DebugFormat(
183 "[INVENTORY CACHE]: Returning folder {0} as type {1} for {2}", folders[type], type, userID);
184
180 return folders[type]; 185 return folders[type];
181 } 186 }
187
188 m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID);
182 189
183 return null; 190 return null;
184 } 191 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 22bd04c..350ad66 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -216,13 +216,29 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
216 return m_InventoryService.PurgeFolder(folder); 216 return m_InventoryService.PurgeFolder(folder);
217 } 217 }
218 218
219 /// <summary>
220 /// Add a new item to the user's inventory
221 /// </summary>
222 /// <param name="item"></param>
223 /// <returns>true if the item was successfully added</returns>
224 public bool AddItem(InventoryItemBase item) 219 public bool AddItem(InventoryItemBase item)
225 { 220 {
221 m_log.DebugFormat(
222 "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
223 item.Name, item.Owner, item.Folder);
224
225 if (UUID.Zero == item.Folder)
226 {
227 InventoryFolderBase f = m_InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType);
228 if (f != null)
229 {
230 item.Folder = f.ID;
231 }
232 else
233 {
234 f = m_InventoryService.GetRootFolder(item.Owner);
235 if (f != null)
236 item.Folder = f.ID;
237 else
238 return false;
239 }
240 }
241
226 return m_InventoryService.AddItem(item); 242 return m_InventoryService.AddItem(item);
227 } 243 }
228 244
@@ -236,7 +252,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
236 return m_InventoryService.UpdateItem(item); 252 return m_InventoryService.UpdateItem(item);
237 } 253 }
238 254
239
240 public bool MoveItems(UUID ownerID, List<InventoryItemBase> items) 255 public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
241 { 256 {
242 return m_InventoryService.MoveItems(ownerID, items); 257 return m_InventoryService.MoveItems(ownerID, items);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
index 153aeec..17d80c7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
75 base.Init(source); 75 base.Init(source);
76 } 76 }
77 77
78
79 #region ISharedRegionModule 78 #region ISharedRegionModule
80 79
81 public void Initialise(IConfigSource source) 80 public void Initialise(IConfigSource source)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index ada26cc..7ac3bb9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -228,6 +228,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
228 { 228 {
229 if (item == null) 229 if (item == null)
230 return false; 230 return false;
231
232 if (UUID.Zero == item.Folder)
233 {
234 InventoryFolderBase f = m_RemoteConnector.GetFolderForType(item.Owner, (AssetType)item.AssetType);
235 if (f != null)
236 {
237 item.Folder = f.ID;
238 }
239 else
240 {
241 f = m_RemoteConnector.GetRootFolder(item.Owner);
242 if (f != null)
243 item.Folder = f.ID;
244 else
245 return false;
246 }
247 }
231 248
232 return m_RemoteConnector.AddItem(item); 249 return m_RemoteConnector.AddItem(item);
233 } 250 }
@@ -294,9 +311,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
294 return m_RemoteConnector.GetAssetPermissions(userID, assetID); 311 return m_RemoteConnector.GetAssetPermissions(userID, assetID);
295 } 312 }
296 313
297
298 #endregion 314 #endregion
299
300
301 } 315 }
302} 316} \ No newline at end of file