aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs68
1 files changed, 44 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 0388828..98160c9 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{
@@ -822,6 +823,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
822 handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); 823 handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
823 handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; 824 handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
824 825
826 handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0];
825// OutPacket(handshake, ThrottleOutPacketType.Task); 827// OutPacket(handshake, ThrottleOutPacketType.Task);
826 // use same as MoveAgentIntoRegion (both should be task ) 828 // use same as MoveAgentIntoRegion (both should be task )
827 OutPacket(handshake, ThrottleOutPacketType.Unknown); 829 OutPacket(handshake, ThrottleOutPacketType.Unknown);
@@ -901,9 +903,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
901 } 903 }
902 } 904 }
903 905
904 public void SendGenericMessage(string method, List<string> message) 906 public void SendGenericMessage(string method, UUID invoice, List<string> message)
905 { 907 {
906 GenericMessagePacket gmp = new GenericMessagePacket(); 908 GenericMessagePacket gmp = new GenericMessagePacket();
909
910 gmp.AgentData.AgentID = AgentId;
911 gmp.AgentData.SessionID = m_sessionId;
912 gmp.AgentData.TransactionID = invoice;
913
907 gmp.MethodData.Method = Util.StringToBytes256(method); 914 gmp.MethodData.Method = Util.StringToBytes256(method);
908 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; 915 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
909 int i = 0; 916 int i = 0;
@@ -916,9 +923,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
916 OutPacket(gmp, ThrottleOutPacketType.Task); 923 OutPacket(gmp, ThrottleOutPacketType.Task);
917 } 924 }
918 925
919 public void SendGenericMessage(string method, List<byte[]> message) 926 public void SendGenericMessage(string method, UUID invoice, List<byte[]> message)
920 { 927 {
921 GenericMessagePacket gmp = new GenericMessagePacket(); 928 GenericMessagePacket gmp = new GenericMessagePacket();
929
930 gmp.AgentData.AgentID = AgentId;
931 gmp.AgentData.SessionID = m_sessionId;
932 gmp.AgentData.TransactionID = invoice;
933
922 gmp.MethodData.Method = Util.StringToBytes256(method); 934 gmp.MethodData.Method = Util.StringToBytes256(method);
923 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; 935 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
924 int i = 0; 936 int i = 0;
@@ -1801,7 +1813,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1801 1813
1802 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 1814 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1803 { 1815 {
1804 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1816 // Fudge this value. It's only needed to make the CRC anyway
1817 const uint FULL_MASK_PERMISSIONS = (uint)0x7fffffff;
1805 1818
1806 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply); 1819 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply);
1807 // TODO: don't create new blocks if recycling an old packet 1820 // TODO: don't create new blocks if recycling an old packet
@@ -2006,7 +2019,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2006 2019
2007 protected void SendBulkUpdateInventoryItem(InventoryItemBase item) 2020 protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
2008 { 2021 {
2009 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 2022 const uint FULL_MASK_PERMISSIONS = (uint)0x7ffffff;
2010 2023
2011 BulkUpdateInventoryPacket bulkUpdate 2024 BulkUpdateInventoryPacket bulkUpdate
2012 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); 2025 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory);
@@ -2065,7 +2078,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2065 /// <see>IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)</see> 2078 /// <see>IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)</see>
2066 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId) 2079 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
2067 { 2080 {
2068 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 2081 const uint FULL_MASK_PERMISSIONS = (uint)0x7fffffff;
2069 2082
2070 UpdateCreateInventoryItemPacket InventoryReply 2083 UpdateCreateInventoryItemPacket InventoryReply
2071 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( 2084 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket(
@@ -3604,7 +3617,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3604 3617
3605 avp.Sender.IsTrial = false; 3618 avp.Sender.IsTrial = false;
3606 avp.Sender.ID = agentID; 3619 avp.Sender.ID = agentID;
3607 m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3620 avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0];
3621 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3608 OutPacket(avp, ThrottleOutPacketType.Task); 3622 OutPacket(avp, ThrottleOutPacketType.Task);
3609 } 3623 }
3610 3624
@@ -3892,6 +3906,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3892 { 3906 {
3893 part.Shape.LightEntry = false; 3907 part.Shape.LightEntry = false;
3894 } 3908 }
3909
3910 if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh))
3911 {
3912 // Ensure that mesh has at least 8 valid faces
3913 part.Shape.ProfileBegin = 12500;
3914 part.Shape.ProfileEnd = 0;
3915 part.Shape.ProfileHollow = 27500;
3916 }
3895 } 3917 }
3896 3918
3897 if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) 3919 if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh))
@@ -4216,7 +4238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4216 pack.Stat = stats.StatsBlock; 4238 pack.Stat = stats.StatsBlock;
4217 4239
4218 pack.Header.Reliable = false; 4240 pack.Header.Reliable = false;
4219 4241 pack.RegionInfo = new SimStatsPacket.RegionInfoBlock[0];
4220 OutPacket(pack, ThrottleOutPacketType.Task); 4242 OutPacket(pack, ThrottleOutPacketType.Task);
4221 } 4243 }
4222 4244
@@ -4607,7 +4629,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4607 rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock(); 4629 rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock();
4608 rinfopack.AgentData.AgentID = AgentId; 4630 rinfopack.AgentData.AgentID = AgentId;
4609 rinfopack.AgentData.SessionID = SessionId; 4631 rinfopack.AgentData.SessionID = SessionId;
4610 4632 rinfopack.RegionInfo3 = new RegionInfoPacket.RegionInfo3Block[0];
4611 4633
4612 OutPacket(rinfopack, ThrottleOutPacketType.Task); 4634 OutPacket(rinfopack, ThrottleOutPacketType.Task);
4613 } 4635 }
@@ -6587,19 +6609,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6587 #endregion 6609 #endregion
6588 6610
6589 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; 6611 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit;
6590 if (handlerAgentRequestSit != null)
6591 if (!(agentRequestSit.AgentData == null
6592 || agentRequestSit.TargetObject == null
6593 || agentRequestSit.TargetObject.TargetID == null
6594 || agentRequestSit.TargetObject.Offset == null))
6595 {
6596 var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID);
6597 if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting
6598 return true;
6599 6612
6600 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, 6613 if (handlerAgentRequestSit != null)
6601 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); 6614 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
6602 } 6615 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
6603 } 6616 }
6604 return true; 6617 return true;
6605 } 6618 }
@@ -7205,7 +7218,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7205 7218
7206 if (handlerUpdatePrimFlags != null) 7219 if (handlerUpdatePrimFlags != null)
7207 { 7220 {
7208 byte[] data = Pack.ToBytes(); 7221// byte[] data = Pack.ToBytes();
7209 // 46,47,48 are special positions within the packet 7222 // 46,47,48 are special positions within the packet
7210 // This may change so perhaps we need a better way 7223 // This may change so perhaps we need a better way
7211 // of storing this (OMV.FlagUpdatePacket.UsePhysics,etc?) 7224 // of storing this (OMV.FlagUpdatePacket.UsePhysics,etc?)
@@ -9847,7 +9860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9847 EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest; 9860 EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
9848 if (handlerEconomoyDataRequest != null) 9861 if (handlerEconomoyDataRequest != null)
9849 { 9862 {
9850 handlerEconomoyDataRequest(AgentId); 9863 handlerEconomoyDataRequest(this);
9851 } 9864 }
9852 return true; 9865 return true;
9853 } 9866 }
@@ -12254,11 +12267,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12254 if (logPacket) 12267 if (logPacket)
12255 m_log.DebugFormat( 12268 m_log.DebugFormat(
12256 "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", 12269 "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}",
12257 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); 12270 Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name, packet.Type);
12258 } 12271 }
12259 12272
12260 if (!ProcessPacketMethod(packet)) 12273 if (!ProcessPacketMethod(packet))
12261 m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); 12274 m_log.WarnFormat(
12275 "[CLIENT]: Unhandled packet {0} from {1} ({2}) in {3}. Ignoring.",
12276 packet.Type, Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name);
12262 } 12277 }
12263 12278
12264 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 12279 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)
@@ -12466,6 +12481,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12466 return String.Empty; 12481 return String.Empty;
12467 } 12482 }
12468 12483
12484 public OSDMap OReport(string uptime, string version)
12485 {
12486 return new OSDMap();
12487 }
12488
12469 /// <summary> 12489 /// <summary>
12470 /// Make an asset request to the asset service in response to a client request. 12490 /// Make an asset request to the asset service in response to a client request.
12471 /// </summary> 12491 /// </summary>