diff options
author | Melanie | 2012-02-10 10:20:51 +0000 |
---|---|---|
committer | Melanie | 2012-02-10 10:20:51 +0000 |
commit | 215acbcc9667077fc665be6d5f81c66cf989891e (patch) | |
tree | 291a607c6fd648b3488d6cc8f05a84ff4f134446 /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Fix: Unable to remove AV from friend list (sqldb-bug) http://opensimulator.or... (diff) | |
download | opensim-SC-215acbcc9667077fc665be6d5f81c66cf989891e.zip opensim-SC-215acbcc9667077fc665be6d5f81c66cf989891e.tar.gz opensim-SC-215acbcc9667077fc665be6d5f81c66cf989891e.tar.bz2 opensim-SC-215acbcc9667077fc665be6d5f81c66cf989891e.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
Diffstat (limited to '')
10 files changed, 54 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index cf0c28b..be699db 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
422 | string assetType) | 422 | string assetType) |
423 | { | 423 | { |
424 | m_log.DebugFormat( | 424 | m_log.DebugFormat( |
425 | "Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}", | 425 | "[BUNCH OF CAPS]: Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}", |
426 | assetID, inventoryItem, inventoryType, assetType); | 426 | assetID, inventoryItem, inventoryType, assetType); |
427 | 427 | ||
428 | sbyte assType = 0; | 428 | sbyte assType = 0; |
@@ -625,7 +625,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
625 | item.AssetType = assType; | 625 | item.AssetType = assType; |
626 | item.InvType = inType; | 626 | item.InvType = inType; |
627 | item.Folder = parentFolder; | 627 | item.Folder = parentFolder; |
628 | item.CurrentPermissions = (uint)PermissionMask.All; | 628 | |
629 | // If we set PermissionMask.All then when we rez the item the next permissions will replace the current | ||
630 | // (owner) permissions. This becomes a problem if next permissions are changed. | ||
631 | item.CurrentPermissions | ||
632 | = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); | ||
633 | |||
629 | item.BasePermissions = (uint)PermissionMask.All; | 634 | item.BasePermissions = (uint)PermissionMask.All; |
630 | item.EveryOnePermissions = 0; | 635 | item.EveryOnePermissions = 0; |
631 | item.NextPermissions = (uint)PermissionMask.All; | 636 | item.NextPermissions = (uint)PermissionMask.All; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index aed03b3..1117f2a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -50,8 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
51 | public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule | 51 | public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule |
52 | { | 52 | { |
53 | // private static readonly ILog m_log = | 53 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
55 | 54 | ||
56 | private Scene m_scene; | 55 | private Scene m_scene; |
57 | // private IAssetService m_assetService; | 56 | // private IAssetService m_assetService; |
@@ -210,6 +209,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
210 | UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, | 209 | UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, |
211 | string assetType,UUID AgentID) | 210 | string assetType,UUID AgentID) |
212 | { | 211 | { |
212 | // m_log.DebugFormat( | ||
213 | // "[NEW FILE AGENT INVENTORY VARIABLE PRICE MODULE]: Upload complete for {0}", inventoryItem); | ||
214 | |||
213 | sbyte assType = 0; | 215 | sbyte assType = 0; |
214 | sbyte inType = 0; | 216 | sbyte inType = 0; |
215 | 217 | ||
@@ -259,13 +261,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
259 | item.AssetType = assType; | 261 | item.AssetType = assType; |
260 | item.InvType = inType; | 262 | item.InvType = inType; |
261 | item.Folder = parentFolder; | 263 | item.Folder = parentFolder; |
262 | item.CurrentPermissions = (uint)PermissionMask.All; | 264 | item.CurrentPermissions |
265 | = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); | ||
263 | item.BasePermissions = (uint)PermissionMask.All; | 266 | item.BasePermissions = (uint)PermissionMask.All; |
264 | item.EveryOnePermissions = 0; | 267 | item.EveryOnePermissions = 0; |
265 | item.NextPermissions = (uint)PermissionMask.All; | 268 | item.NextPermissions = (uint)PermissionMask.All; |
266 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 269 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
267 | m_scene.AddInventoryItem(item); | 270 | m_scene.AddInventoryItem(item); |
268 | |||
269 | } | 271 | } |
270 | } | 272 | } |
271 | } | 273 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index e4bacd4..7a3d97e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -339,7 +339,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
339 | m_scene.AddSceneObject(grp); | 339 | m_scene.AddSceneObject(grp); |
340 | grp.AbsolutePosition = obj.Position; | 340 | grp.AbsolutePosition = obj.Position; |
341 | } | 341 | } |
342 | 342 | ||
343 | allparts[i] = grp; | 343 | allparts[i] = grp; |
344 | } | 344 | } |
345 | 345 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f019a83..c20f7b2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5168,7 +5168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5168 | AddLocalPacketHandler(PacketType.ImprovedInstantMessage, HandlerImprovedInstantMessage, false); | 5168 | AddLocalPacketHandler(PacketType.ImprovedInstantMessage, HandlerImprovedInstantMessage, false); |
5169 | AddLocalPacketHandler(PacketType.AcceptFriendship, HandlerAcceptFriendship); | 5169 | AddLocalPacketHandler(PacketType.AcceptFriendship, HandlerAcceptFriendship); |
5170 | AddLocalPacketHandler(PacketType.DeclineFriendship, HandlerDeclineFriendship); | 5170 | AddLocalPacketHandler(PacketType.DeclineFriendship, HandlerDeclineFriendship); |
5171 | AddLocalPacketHandler(PacketType.TerminateFriendship, HandlerTerminateFrendship); | 5171 | AddLocalPacketHandler(PacketType.TerminateFriendship, HandlerTerminateFriendship); |
5172 | AddLocalPacketHandler(PacketType.RezObject, HandlerRezObject); | 5172 | AddLocalPacketHandler(PacketType.RezObject, HandlerRezObject); |
5173 | AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject); | 5173 | AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject); |
5174 | AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand); | 5174 | AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand); |
@@ -5891,7 +5891,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5891 | return true; | 5891 | return true; |
5892 | } | 5892 | } |
5893 | 5893 | ||
5894 | private bool HandlerTerminateFrendship(IClientAPI sender, Packet Pack) | 5894 | private bool HandlerTerminateFriendship(IClientAPI sender, Packet Pack) |
5895 | { | 5895 | { |
5896 | TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; | 5896 | TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; |
5897 | 5897 | ||
@@ -5906,13 +5906,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5906 | 5906 | ||
5907 | UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; | 5907 | UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; |
5908 | UUID exFriendID = tfriendpack.ExBlock.OtherID; | 5908 | UUID exFriendID = tfriendpack.ExBlock.OtherID; |
5909 | 5909 | FriendshipTermination TerminateFriendshipHandler = OnTerminateFriendship; | |
5910 | FriendshipTermination handlerTerminateFriendship = OnTerminateFriendship; | 5910 | if (TerminateFriendshipHandler != null) |
5911 | if (handlerTerminateFriendship != null) | ||
5912 | { | 5911 | { |
5913 | handlerTerminateFriendship(this, listOwnerAgentID, exFriendID); | 5912 | TerminateFriendshipHandler(this, listOwnerAgentID, exFriendID); |
5913 | return true; | ||
5914 | } | 5914 | } |
5915 | return true; | 5915 | return false; |
5916 | } | 5916 | } |
5917 | 5917 | ||
5918 | private bool HandleFindAgent(IClientAPI client, Packet Packet) | 5918 | private bool HandleFindAgent(IClientAPI client, Packet Packet) |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index fe75271..a47bc9a 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -830,6 +830,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
830 | group = objlist[i]; | 830 | group = objlist[i]; |
831 | SceneObjectPart rootPart = group.RootPart; | 831 | SceneObjectPart rootPart = group.RootPart; |
832 | 832 | ||
833 | // m_log.DebugFormat( | ||
834 | // "[InventoryAccessModule]: Preparing to rez {0} {1} {2} ownermask={3:X} nextownermask={4:X} groupmask={5:X} everyonemask={6:X} for {7}", | ||
835 | // group.Name, group.LocalId, group.UUID, | ||
836 | // group.RootPart.OwnerMask, group.RootPart.NextOwnerMask, group.RootPart.GroupMask, group.RootPart.EveryoneMask, | ||
837 | // remoteClient.Name); | ||
838 | |||
833 | // Vector3 storedPosition = group.AbsolutePosition; | 839 | // Vector3 storedPosition = group.AbsolutePosition; |
834 | if (group.UUID == UUID.Zero) | 840 | if (group.UUID == UUID.Zero) |
835 | { | 841 | { |
@@ -892,6 +898,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
892 | 898 | ||
893 | rootPart.ScheduleFullUpdate(); | 899 | rootPart.ScheduleFullUpdate(); |
894 | } | 900 | } |
901 | |||
902 | // m_log.DebugFormat( | ||
903 | // "[InventoryAccessModule]: Rezzed {0} {1} {2} ownermask={3:X} nextownermask={4:X} groupmask={5:X} everyonemask={6:X} for {7}", | ||
904 | // group.Name, group.LocalId, group.UUID, | ||
905 | // group.RootPart.OwnerMask, group.RootPart.NextOwnerMask, group.RootPart.GroupMask, group.RootPart.EveryoneMask, | ||
906 | // remoteClient.Name); | ||
895 | } | 907 | } |
896 | 908 | ||
897 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); | 909 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); |
@@ -958,7 +970,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
958 | } | 970 | } |
959 | 971 | ||
960 | rootPart.FromFolderID = item.Folder; | 972 | rootPart.FromFolderID = item.Folder; |
961 | 973 | ||
974 | // Console.WriteLine("rootPart.OwnedID {0}, item.Owner {1}, item.CurrentPermissions {2:X}", | ||
975 | // rootPart.OwnerID, item.Owner, item.CurrentPermissions); | ||
976 | |||
962 | if ((rootPart.OwnerID != item.Owner) || | 977 | if ((rootPart.OwnerID != item.Owner) || |
963 | (item.CurrentPermissions & 16) != 0 || | 978 | (item.CurrentPermissions & 16) != 0 || |
964 | (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) | 979 | (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) |
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index 2731291..dc3ff89 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
58 | /// </param> | 58 | /// </param> |
59 | /// <param name="scene"></param> | 59 | /// <param name="scene"></param> |
60 | /// <param name="appearance">The avatar appearance to use for the new NPC.</param> | 60 | /// <param name="appearance">The avatar appearance to use for the new NPC.</param> |
61 | /// <returns>The UUID of the ScenePresence created.</returns> | 61 | /// <returns>The UUID of the ScenePresence created. UUID.Zero if there was a failure.</returns> |
62 | UUID CreateNPC( | 62 | UUID CreateNPC( |
63 | string firstname, | 63 | string firstname, |
64 | string lastname, | 64 | string lastname, |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 01df575..fff39fb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -330,6 +330,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
330 | item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); | 330 | item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); |
331 | item.Name = itemUpd.Name; | 331 | item.Name = itemUpd.Name; |
332 | item.Description = itemUpd.Description; | 332 | item.Description = itemUpd.Description; |
333 | |||
334 | // m_log.DebugFormat( | ||
335 | // "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", | ||
336 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | ||
337 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | ||
338 | |||
333 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) | 339 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) |
334 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | 340 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; |
335 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; | 341 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; |
@@ -338,6 +344,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
338 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; | 344 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; |
339 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) | 345 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) |
340 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | 346 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; |
347 | |||
348 | // m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags); | ||
349 | |||
341 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; | 350 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; |
342 | item.GroupID = itemUpd.GroupID; | 351 | item.GroupID = itemUpd.GroupID; |
343 | item.GroupOwned = itemUpd.GroupOwned; | 352 | item.GroupOwned = itemUpd.GroupOwned; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index b56d3fc..f3660a5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -269,6 +269,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
269 | 269 | ||
270 | public void ApplyNextOwnerPermissions() | 270 | public void ApplyNextOwnerPermissions() |
271 | { | 271 | { |
272 | // m_log.DebugFormat("[PRIM INVENTORY]: Applying next owner permissions to {0} {1}", Name, UUID); | ||
273 | |||
272 | SceneObjectPart[] parts = m_parts.GetArray(); | 274 | SceneObjectPart[] parts = m_parts.GetArray(); |
273 | for (int i = 0; i < parts.Length; i++) | 275 | for (int i = 0; i < parts.Length; i++) |
274 | parts[i].ApplyNextOwnerPermissions(); | 276 | parts[i].ApplyNextOwnerPermissions(); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 03b52c0..d0b822c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
44 | private readonly string m_firstname; | 44 | private readonly string m_firstname; |
45 | private readonly string m_lastname; | 45 | private readonly string m_lastname; |
46 | private readonly Vector3 m_startPos; | 46 | private readonly Vector3 m_startPos; |
47 | private readonly UUID m_uuid = UUID.Random(); | 47 | private UUID m_uuid = UUID.Random(); |
48 | private readonly Scene m_scene; | 48 | private readonly Scene m_scene; |
49 | private readonly UUID m_ownerID; | 49 | private readonly UUID m_ownerID; |
50 | 50 | ||
@@ -444,6 +444,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
444 | public virtual UUID AgentId | 444 | public virtual UUID AgentId |
445 | { | 445 | { |
446 | get { return m_uuid; } | 446 | get { return m_uuid; } |
447 | set { m_uuid = value; } | ||
447 | } | 448 | } |
448 | 449 | ||
449 | public UUID SessionId | 450 | public UUID SessionId |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index a0ae55a..6803644 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -155,20 +155,21 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
155 | "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); | 155 | "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); |
156 | 156 | ||
157 | sp.CompleteMovement(npcAvatar, false); | 157 | sp.CompleteMovement(npcAvatar, false); |
158 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
158 | } | 159 | } |
159 | else | 160 | else |
160 | { | 161 | { |
161 | m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); | 162 | m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); |
163 | npcAvatar.AgentId = UUID.Zero; | ||
162 | } | 164 | } |
163 | 165 | ||
164 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
165 | } | 166 | } |
166 | ev.Set(); | 167 | ev.Set(); |
167 | }); | 168 | }); |
168 | 169 | ||
169 | ev.WaitOne(); | 170 | ev.WaitOne(); |
170 | 171 | ||
171 | m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); | 172 | // m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); |
172 | 173 | ||
173 | return npcAvatar.AgentId; | 174 | return npcAvatar.AgentId; |
174 | } | 175 | } |