diff options
author | Diva Canto | 2009-08-18 22:17:47 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-18 22:17:47 -0700 |
commit | 124f66bfc25984a01491b8447fa97bea2633281c (patch) | |
tree | 9f6ba47c216457b39a2e5c7bb921e41afa71d795 /OpenSim/Region | |
parent | Added new OpenSim.ini setting: "client_throttle_max_bps" which overrides user... (diff) | |
download | opensim-SC-124f66bfc25984a01491b8447fa97bea2633281c.zip opensim-SC-124f66bfc25984a01491b8447fa97bea2633281c.tar.gz opensim-SC-124f66bfc25984a01491b8447fa97bea2633281c.tar.bz2 opensim-SC-124f66bfc25984a01491b8447fa97bea2633281c.tar.xz |
jhurliman's patch in http://opensimulator.org/mantis/view.php?id=4024
Diffstat (limited to 'OpenSim/Region')
8 files changed, 46 insertions, 30 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 06bea3d..16ce9e0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -6633,9 +6633,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6633 | } | 6633 | } |
6634 | else // Agent | 6634 | else // Agent |
6635 | { | 6635 | { |
6636 | //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); | ||
6637 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); | 6636 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); |
6638 | InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID)); | 6637 | InventoryItemBase assetRequestItem = new InventoryItemBase(itemID, AgentId); |
6638 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
6639 | if (assetRequestItem == null) | 6639 | if (assetRequestItem == null) |
6640 | { | 6640 | { |
6641 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | 6641 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 582beee..35c59aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -130,7 +130,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
130 | } | 130 | } |
131 | else | 131 | else |
132 | { | 132 | { |
133 | InventoryItemBase baseItem = invService.GetItem(new InventoryItemBase(appearance.Wearables[i].ItemID)); | 133 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); |
134 | baseItem = invService.GetItem(baseItem); | ||
134 | 135 | ||
135 | if (baseItem != null) | 136 | if (baseItem != null) |
136 | { | 137 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index a68db1b..ff12361 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | |||
@@ -65,7 +65,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures | |||
65 | { | 65 | { |
66 | IInventoryService invService = m_scene.InventoryService; | 66 | IInventoryService invService = m_scene.InventoryService; |
67 | 67 | ||
68 | InventoryItemBase item = invService.GetItem(new InventoryItemBase(gestureId)); | 68 | InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); |
69 | item = invService.GetItem(item); | ||
69 | if (item != null) | 70 | if (item != null) |
70 | { | 71 | { |
71 | item.Flags = 1; | 72 | item.Flags = 1; |
@@ -80,7 +81,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures | |||
80 | { | 81 | { |
81 | IInventoryService invService = m_scene.InventoryService; | 82 | IInventoryService invService = m_scene.InventoryService; |
82 | 83 | ||
83 | InventoryItemBase item = invService.GetItem(new InventoryItemBase(gestureId)); | 84 | InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); |
85 | item = invService.GetItem(item); | ||
84 | if (item != null) | 86 | if (item != null) |
85 | { | 87 | { |
86 | item.Flags = 0; | 88 | item.Flags = 0; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 5315c11..3a65336 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -257,8 +257,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
257 | invService.GetFolderForType(client.AgentId, AssetType.TrashFolder); | 257 | invService.GetFolderForType(client.AgentId, AssetType.TrashFolder); |
258 | 258 | ||
259 | UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 259 | UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
260 | 260 | ||
261 | InventoryItemBase item = invService.GetItem(new InventoryItemBase(inventoryEntityID)); | 261 | InventoryItemBase item = new InventoryItemBase(inventoryEntityID, client.AgentId); |
262 | item = invService.GetItem(item); | ||
262 | InventoryFolderBase folder = null; | 263 | InventoryFolderBase folder = null; |
263 | 264 | ||
264 | if (item != null && trashFolder != null) | 265 | if (item != null && trashFolder != null) |
@@ -271,7 +272,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
271 | } | 272 | } |
272 | else | 273 | else |
273 | { | 274 | { |
274 | folder = invService.GetFolder(new InventoryFolderBase(inventoryEntityID)); | 275 | folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); |
276 | folder = invService.GetFolder(folder); | ||
275 | 277 | ||
276 | if (folder != null & trashFolder != null) | 278 | if (folder != null & trashFolder != null) |
277 | { | 279 | { |
@@ -451,10 +453,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
451 | else | 453 | else |
452 | { | 454 | { |
453 | UUID itemID = new UUID(msg.binaryBucket, 1); | 455 | UUID itemID = new UUID(msg.binaryBucket, 1); |
454 | InventoryItemBase item = new InventoryItemBase(); | 456 | InventoryItemBase item = new InventoryItemBase(itemID, user.ControllingClient.AgentId); |
455 | |||
456 | item.ID = itemID; | ||
457 | item.Owner = user.ControllingClient.AgentId; | ||
458 | 457 | ||
459 | // Fetch from service | 458 | // Fetch from service |
460 | // | 459 | // |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index dd451ef..492598e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -483,12 +483,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
483 | string userInventoryServerURI = HGNetworkServersInfo.ServerURI(uinfo.UserProfile.UserInventoryURI); | 483 | string userInventoryServerURI = HGNetworkServersInfo.ServerURI(uinfo.UserProfile.UserInventoryURI); |
484 | string uri = m_LocalGridInventoryURI.TrimEnd('/'); | 484 | string uri = m_LocalGridInventoryURI.TrimEnd('/'); |
485 | 485 | ||
486 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, comparing {0} to {1}.", userInventoryServerURI, uri); | ||
487 | |||
488 | if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) | 486 | if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) |
489 | { | 487 | { |
490 | return true; | 488 | return true; |
491 | } | 489 | } |
490 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: user is foreign({0} - {1})", userInventoryServerURI, uri); | ||
492 | return false; | 491 | return false; |
493 | } | 492 | } |
494 | 493 | ||
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 9c71b41..f360577 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -966,7 +966,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
966 | if (objectID == UUID.Zero) // User inventory | 966 | if (objectID == UUID.Zero) // User inventory |
967 | { | 967 | { |
968 | IInventoryService invService = m_scene.InventoryService; | 968 | IInventoryService invService = m_scene.InventoryService; |
969 | InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(notecard)); | 969 | InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); |
970 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
970 | if (assetRequestItem == null) // Library item | 971 | if (assetRequestItem == null) // Library item |
971 | { | 972 | { |
972 | assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); | 973 | assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); |
@@ -1385,7 +1386,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1385 | if (objectID == UUID.Zero) // User inventory | 1386 | if (objectID == UUID.Zero) // User inventory |
1386 | { | 1387 | { |
1387 | IInventoryService invService = m_scene.InventoryService; | 1388 | IInventoryService invService = m_scene.InventoryService; |
1388 | InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(script)); | 1389 | InventoryItemBase assetRequestItem = new InventoryItemBase(script, user); |
1390 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
1389 | if (assetRequestItem == null) // Library item | 1391 | if (assetRequestItem == null) // Library item |
1390 | { | 1392 | { |
1391 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); | 1393 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); |
@@ -1479,7 +1481,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1479 | if (objectID == UUID.Zero) // User inventory | 1481 | if (objectID == UUID.Zero) // User inventory |
1480 | { | 1482 | { |
1481 | IInventoryService invService = m_scene.InventoryService; | 1483 | IInventoryService invService = m_scene.InventoryService; |
1482 | InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(notecard)); | 1484 | InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); |
1485 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
1483 | if (assetRequestItem == null) // Library item | 1486 | if (assetRequestItem == null) // Library item |
1484 | { | 1487 | { |
1485 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); | 1488 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 46777e1..48c7f4e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -140,7 +140,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | /// <returns></returns> | 140 | /// <returns></returns> |
141 | public virtual UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) | 141 | public virtual UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) |
142 | { | 142 | { |
143 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 143 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
144 | item = InventoryService.GetItem(item); | ||
144 | 145 | ||
145 | if (item != null) | 146 | if (item != null) |
146 | { | 147 | { |
@@ -315,7 +316,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
315 | public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID, | 316 | public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID, |
316 | UUID itemID, InventoryItemBase itemUpd) | 317 | UUID itemID, InventoryItemBase itemUpd) |
317 | { | 318 | { |
318 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 319 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
320 | item = InventoryService.GetItem(item); | ||
319 | 321 | ||
320 | if (item != null) | 322 | if (item != null) |
321 | { | 323 | { |
@@ -408,7 +410,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
408 | { | 410 | { |
409 | Console.WriteLine("Scene.Inventory.cs: GiveInventoryItem"); | 411 | Console.WriteLine("Scene.Inventory.cs: GiveInventoryItem"); |
410 | 412 | ||
411 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemId)); | 413 | InventoryItemBase item = new InventoryItemBase(itemId, senderId); |
414 | item = InventoryService.GetItem(item); | ||
412 | 415 | ||
413 | if ((item != null) && (item.Owner == senderId)) | 416 | if ((item != null) && (item.Owner == senderId)) |
414 | { | 417 | { |
@@ -558,7 +561,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
558 | 561 | ||
559 | if (item == null) | 562 | if (item == null) |
560 | { | 563 | { |
561 | item = InventoryService.GetItem(new InventoryItemBase(oldItemID)); | 564 | item = new InventoryItemBase(oldItemID, remoteClient.AgentId); |
565 | item = InventoryService.GetItem(item); | ||
562 | 566 | ||
563 | if (item == null) | 567 | if (item == null) |
564 | { | 568 | { |
@@ -636,7 +640,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
636 | m_log.DebugFormat( | 640 | m_log.DebugFormat( |
637 | "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); | 641 | "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); |
638 | 642 | ||
639 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 643 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
644 | item = InventoryService.GetItem(item); | ||
640 | 645 | ||
641 | if (item != null) | 646 | if (item != null) |
642 | { | 647 | { |
@@ -1224,7 +1229,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1224 | UUID copyID = UUID.Random(); | 1229 | UUID copyID = UUID.Random(); |
1225 | if (itemID != UUID.Zero) | 1230 | if (itemID != UUID.Zero) |
1226 | { | 1231 | { |
1227 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 1232 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
1233 | item = InventoryService.GetItem(item); | ||
1228 | 1234 | ||
1229 | // Try library | 1235 | // Try library |
1230 | if (null == item) | 1236 | if (null == item) |
@@ -1287,7 +1293,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1287 | 1293 | ||
1288 | if (itemID != UUID.Zero) // transferred from an avatar inventory to the prim's inventory | 1294 | if (itemID != UUID.Zero) // transferred from an avatar inventory to the prim's inventory |
1289 | { | 1295 | { |
1290 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 1296 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
1297 | item = InventoryService.GetItem(item); | ||
1291 | 1298 | ||
1292 | // Try library | 1299 | // Try library |
1293 | // XXX clumsy, possibly should be one call | 1300 | // XXX clumsy, possibly should be one call |
@@ -1672,7 +1679,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1672 | 1679 | ||
1673 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 1680 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
1674 | { | 1681 | { |
1675 | item = new InventoryItemBase(objectGroup.RootPart.FromUserInventoryItemID); | 1682 | item = new InventoryItemBase(objectGroup.RootPart.FromUserInventoryItemID, userID); |
1676 | item = InventoryService.GetItem(item); | 1683 | item = InventoryService.GetItem(item); |
1677 | 1684 | ||
1678 | //item = userInfo.RootFolder.FindItem( | 1685 | //item = userInfo.RootFolder.FindItem( |
@@ -1834,7 +1841,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1834 | 1841 | ||
1835 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup); | 1842 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup); |
1836 | 1843 | ||
1837 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 1844 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
1845 | item = InventoryService.GetItem(item); | ||
1838 | 1846 | ||
1839 | if (item != null) | 1847 | if (item != null) |
1840 | { | 1848 | { |
@@ -1984,7 +1992,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1984 | BypassRayCast, bRayEndIsIntersection,true,scale, false); | 1992 | BypassRayCast, bRayEndIsIntersection,true,scale, false); |
1985 | 1993 | ||
1986 | // Rez object | 1994 | // Rez object |
1987 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 1995 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
1996 | item = InventoryService.GetItem(item); | ||
1988 | 1997 | ||
1989 | if (item != null) | 1998 | if (item != null) |
1990 | { | 1999 | { |
@@ -2309,7 +2318,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2309 | ScenePresence presence; | 2318 | ScenePresence presence; |
2310 | if (TryGetAvatar(remoteClient.AgentId, out presence)) | 2319 | if (TryGetAvatar(remoteClient.AgentId, out presence)) |
2311 | { | 2320 | { |
2312 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID, remoteClient.AgentId)); | 2321 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2322 | item = InventoryService.GetItem(item); | ||
2313 | 2323 | ||
2314 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2324 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); |
2315 | IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); | 2325 | IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); |
@@ -2360,7 +2370,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2360 | if (TryGetAvatar(remoteClient.AgentId, out presence)) | 2370 | if (TryGetAvatar(remoteClient.AgentId, out presence)) |
2361 | { | 2371 | { |
2362 | // XXYY!! | 2372 | // XXYY!! |
2363 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 2373 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2374 | item = InventoryService.GetItem(item); | ||
2364 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2375 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); |
2365 | IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); | 2376 | IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); |
2366 | if (ava != null) | 2377 | if (ava != null) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index fde922f..1bbca49 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -404,7 +404,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
404 | return; | 404 | return; |
405 | } | 405 | } |
406 | 406 | ||
407 | InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); | 407 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
408 | item = InventoryService.GetItem(item); | ||
408 | 409 | ||
409 | if (item != null) | 410 | if (item != null) |
410 | { | 411 | { |