aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMelanie2013-03-24 18:56:28 +0100
committerMelanie2013-03-24 18:56:28 +0100
commitc341664c1b8ccf3bd7b81795b900b971a15ff318 (patch)
tree7d88b1b0f028e798f49c729c1626d06f96d2ba35 /OpenSim/Region/ClientStack
parentMerge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff)
downloadopensim-SC_OLD-c341664c1b8ccf3bd7b81795b900b971a15ff318.zip
opensim-SC_OLD-c341664c1b8ccf3bd7b81795b900b971a15ff318.tar.gz
opensim-SC_OLD-c341664c1b8ccf3bd7b81795b900b971a15ff318.tar.bz2
opensim-SC_OLD-c341664c1b8ccf3bd7b81795b900b971a15ff318.tar.xz
Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMask
with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions"
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs9
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs8
2 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index eadca9b..921d3bf 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -50,6 +50,7 @@ using OpenSim.Services.Interfaces;
50using Caps = OpenSim.Framework.Capabilities.Caps; 50using Caps = OpenSim.Framework.Capabilities.Caps;
51using OSDArray = OpenMetaverse.StructuredData.OSDArray; 51using OSDArray = OpenMetaverse.StructuredData.OSDArray;
52using OSDMap = OpenMetaverse.StructuredData.OSDMap; 52using OSDMap = OpenMetaverse.StructuredData.OSDMap;
53using PermissionMask = OpenSim.Framework.PermissionMask;
53 54
54namespace OpenSim.Region.ClientStack.Linden 55namespace OpenSim.Region.ClientStack.Linden
55{ 56{
@@ -830,9 +831,9 @@ namespace OpenSim.Region.ClientStack.Linden
830 texitem.Folder = texturesFolder; 831 texitem.Folder = texturesFolder;
831 832
832 texitem.CurrentPermissions 833 texitem.CurrentPermissions
833 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); 834 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
834 835
835 texitem.BasePermissions = (uint)PermissionMask.All; 836 texitem.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
836 texitem.EveryOnePermissions = 0; 837 texitem.EveryOnePermissions = 0;
837 texitem.NextPermissions = (uint)PermissionMask.All; 838 texitem.NextPermissions = (uint)PermissionMask.All;
838 texitem.CreationDate = Util.UnixTimeSinceEpoch(); 839 texitem.CreationDate = Util.UnixTimeSinceEpoch();
@@ -1097,9 +1098,9 @@ namespace OpenSim.Region.ClientStack.Linden
1097 else 1098 else
1098 { 1099 {
1099 item.CurrentPermissions 1100 item.CurrentPermissions
1100 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); 1101 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
1101 1102
1102 item.BasePermissions = (uint)PermissionMask.All; 1103 item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1103 item.EveryOnePermissions = 0; 1104 item.EveryOnePermissions = 0;
1104 item.NextPermissions = (uint)PermissionMask.All; 1105 item.NextPermissions = (uint)PermissionMask.All;
1105 } 1106 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 5b2bad4..f8b9352 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -51,6 +51,7 @@ using RegionFlags = OpenMetaverse.RegionFlags;
51using Nini.Config; 51using Nini.Config;
52 52
53using System.IO; 53using System.IO;
54using PermissionMask = OpenSim.Framework.PermissionMask;
54 55
55namespace OpenSim.Region.ClientStack.LindenUDP 56namespace OpenSim.Region.ClientStack.LindenUDP
56{ 57{
@@ -1802,7 +1803,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1802 1803
1803 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 1804 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1804 { 1805 {
1805 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1806 // Fudge this value. It's only needed to make the CRC anyway
1807 const uint FULL_MASK_PERMISSIONS = (uint)0x7fffffff;
1806 1808
1807 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply); 1809 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply);
1808 // TODO: don't create new blocks if recycling an old packet 1810 // TODO: don't create new blocks if recycling an old packet
@@ -2007,7 +2009,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2007 2009
2008 protected void SendBulkUpdateInventoryItem(InventoryItemBase item) 2010 protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
2009 { 2011 {
2010 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 2012 const uint FULL_MASK_PERMISSIONS = (uint)0x7ffffff;
2011 2013
2012 BulkUpdateInventoryPacket bulkUpdate 2014 BulkUpdateInventoryPacket bulkUpdate
2013 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); 2015 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory);
@@ -2066,7 +2068,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2066 /// <see>IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)</see> 2068 /// <see>IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)</see>
2067 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId) 2069 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
2068 { 2070 {
2069 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 2071 const uint FULL_MASK_PERMISSIONS = (uint)0x7fffffff;
2070 2072
2071 UpdateCreateInventoryItemPacket InventoryReply 2073 UpdateCreateInventoryItemPacket InventoryReply
2072 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( 2074 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket(