diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
12 files changed, 62 insertions, 34 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index fa72410..ce9f145 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2743,7 +2743,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2743 | DirPlacesReplyPacket.StatusDataBlock[] status = | 2743 | DirPlacesReplyPacket.StatusDataBlock[] status = |
2744 | new DirPlacesReplyPacket.StatusDataBlock[0]; | 2744 | new DirPlacesReplyPacket.StatusDataBlock[0]; |
2745 | 2745 | ||
2746 | int i = 0; | ||
2747 | foreach (DirPlacesReplyData d in data) | 2746 | foreach (DirPlacesReplyData d in data) |
2748 | { | 2747 | { |
2749 | int idx = replies.Length; | 2748 | int idx = replies.Length; |
@@ -2779,7 +2778,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2779 | 2778 | ||
2780 | replies = new DirPlacesReplyPacket.QueryRepliesBlock[0]; | 2779 | replies = new DirPlacesReplyPacket.QueryRepliesBlock[0]; |
2781 | status = new DirPlacesReplyPacket.StatusDataBlock[0]; | 2780 | status = new DirPlacesReplyPacket.StatusDataBlock[0]; |
2782 | |||
2783 | } | 2781 | } |
2784 | } | 2782 | } |
2785 | 2783 | ||
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; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | |||
36 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | 37 | using 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 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | |||
31 | using OpenMetaverse; | 30 | using OpenMetaverse; |
32 | using Nini.Config; | 31 | using Nini.Config; |
33 | using log4net; | 32 | using log4net; |
34 | |||
35 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
36 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
37 | 35 | ||
38 | |||
39 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 36 | namespace 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 |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index ab18c93..0384224 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -984,7 +984,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
984 | 984 | ||
985 | private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId) | 985 | private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId) |
986 | { | 986 | { |
987 | Console.WriteLine("CreateAgentInventoryItemFromTask"); | ||
988 | TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); | 987 | TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); |
989 | 988 | ||
990 | if (null == taskItem) | 989 | if (null == taskItem) |
@@ -1055,7 +1054,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1055 | /// <param name="itemID"></param> | 1054 | /// <param name="itemID"></param> |
1056 | public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId) | 1055 | public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId) |
1057 | { | 1056 | { |
1058 | m_log.Info("Adding task inventory"); | 1057 | m_log.DebugFormat( |
1058 | "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}", | ||
1059 | itemId, part.Name, folderId, remoteClient.Name); | ||
1060 | |||
1059 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); | 1061 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); |
1060 | 1062 | ||
1061 | if (agentItem == null) | 1063 | if (agentItem == null) |
@@ -1121,7 +1123,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1121 | /// <see>MoveTaskInventoryItem</see> | 1123 | /// <see>MoveTaskInventoryItem</see> |
1122 | /// </summary> | 1124 | /// </summary> |
1123 | /// <param name="remoteClient"></param> | 1125 | /// <param name="remoteClient"></param> |
1124 | /// <param name="folderID"></param> | 1126 | /// <param name="folderID"> |
1127 | /// The user inventory folder to move (or copy) the item to. If null, then the most | ||
1128 | /// suitable system folder is used (e.g. the Objects folder for objects). If there is no suitable folder, then | ||
1129 | /// the item is placed in the user's root inventory folder | ||
1130 | /// </param> | ||
1125 | /// <param name="part"></param> | 1131 | /// <param name="part"></param> |
1126 | /// <param name="itemID"></param> | 1132 | /// <param name="itemID"></param> |
1127 | public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId) | 1133 | public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 94b9d40..1e2e0c8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4179,8 +4179,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4179 | } | 4179 | } |
4180 | 4180 | ||
4181 | // destination is an avatar | 4181 | // destination is an avatar |
4182 | InventoryItemBase agentItem = | 4182 | InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); |
4183 | World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); | ||
4184 | 4183 | ||
4185 | if (agentItem == null) | 4184 | if (agentItem == null) |
4186 | return; | 4185 | return; |
@@ -4190,7 +4189,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4190 | byte[] objBytes = agentItem.ID.GetBytes(); | 4189 | byte[] objBytes = agentItem.ID.GetBytes(); |
4191 | Array.Copy(objBytes, 0, bucket, 1, 16); | 4190 | Array.Copy(objBytes, 0, bucket, 1, 16); |
4192 | 4191 | ||
4193 | Console.WriteLine("Giving inventory"); | ||
4194 | GridInstantMessage msg = new GridInstantMessage(World, | 4192 | GridInstantMessage msg = new GridInstantMessage(World, |
4195 | m_host.UUID, m_host.Name+", an object owned by "+ | 4193 | m_host.UUID, m_host.Name+", an object owned by "+ |
4196 | resolveName(m_host.OwnerID)+",", destId, | 4194 | resolveName(m_host.OwnerID)+",", destId, |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 0f274f3..e5e8a56 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1373,7 +1373,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1373 | { | 1373 | { |
1374 | sdoc.LoadXml(xml); | 1374 | sdoc.LoadXml(xml); |
1375 | } | 1375 | } |
1376 | catch (System.Xml.XmlException e) | 1376 | catch (System.Xml.XmlException) |
1377 | { | 1377 | { |
1378 | loadedState = false; | 1378 | loadedState = false; |
1379 | } | 1379 | } |