aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorAdam Frisby2009-01-04 19:09:22 +0000
committerAdam Frisby2009-01-04 19:09:22 +0000
commitf0864b5154374a4fb06640e68a96a27b810fd60b (patch)
tree025e18d610d822f2e74e330bd764461c653d3b70 /OpenSim/Region/ClientStack
parentImprove LOD scaling for anisotropic sculpted prim meshes (diff)
downloadopensim-SC_OLD-f0864b5154374a4fb06640e68a96a27b810fd60b.zip
opensim-SC_OLD-f0864b5154374a4fb06640e68a96a27b810fd60b.tar.gz
opensim-SC_OLD-f0864b5154374a4fb06640e68a96a27b810fd60b.tar.bz2
opensim-SC_OLD-f0864b5154374a4fb06640e68a96a27b810fd60b.tar.xz
* Minor tweak to crash logger to copy ini with log if save-to-dir is on.
* Added BinaryGenericMessage handler for cases where GenericMessage isnt transmitting pure-utf8 characters.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 85cc337..9c0a9cf 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -111,6 +111,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
111 protected ulong m_activeGroupPowers; 111 protected ulong m_activeGroupPowers;
112 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); 112 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
113 113
114 // LLClientView Only
115 public delegate void BinaryGenericMessage(Object sender, string method, byte[][] args);
116
114 /* Instantiated Designated Event Delegates */ 117 /* Instantiated Designated Event Delegates */
115 //- used so we don't create new objects for each incoming packet and then toss it out later */ 118 //- used so we don't create new objects for each incoming packet and then toss it out later */
116 119
@@ -866,6 +869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
866 869
867 // Previously ClientView.API partial class 870 // Previously ClientView.API partial class
868 public event GenericMessage OnGenericMessage; 871 public event GenericMessage OnGenericMessage;
872 public event BinaryGenericMessage OnBinaryGenericMessage;
869 public event Action<IClientAPI> OnLogout; 873 public event Action<IClientAPI> OnLogout;
870 public event ObjectPermissions OnObjectPermissions; 874 public event ObjectPermissions OnObjectPermissions;
871 public event Action<IClientAPI> OnConnectionClosed; 875 public event Action<IClientAPI> OnConnectionClosed;
@@ -3665,20 +3669,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3665 { 3669 {
3666 GenericMessagePacket gmpack = (GenericMessagePacket) pack; 3670 GenericMessagePacket gmpack = (GenericMessagePacket) pack;
3667 if (m_genericPacketHandlers.Count == 0) return false; 3671 if (m_genericPacketHandlers.Count == 0) return false;
3672
3668 handlerGenericMessage = null; 3673 handlerGenericMessage = null;
3674
3669 string method = Util.FieldToString(gmpack.MethodData.Method).ToLower().Trim(); 3675 string method = Util.FieldToString(gmpack.MethodData.Method).ToLower().Trim();
3676
3670 if (m_genericPacketHandlers.TryGetValue(method, out handlerGenericMessage)) 3677 if (m_genericPacketHandlers.TryGetValue(method, out handlerGenericMessage))
3671 { 3678 {
3672 List<string> msg = new List<string>(); 3679 List<string> msg = new List<string>();
3680 List<byte[]> msgBytes = new List<byte[]>();
3673 3681
3674 if (handlerGenericMessage != null) 3682 if (handlerGenericMessage != null)
3675 { 3683 {
3676 foreach (GenericMessagePacket.ParamListBlock block in gmpack.ParamList) 3684 foreach (GenericMessagePacket.ParamListBlock block in gmpack.ParamList)
3677 { 3685 {
3678 msg.Add(Util.FieldToString(block.Parameter)); 3686 msg.Add(Util.FieldToString(block.Parameter));
3687 msgBytes.Add(block.Parameter);
3679 } 3688 }
3680 try 3689 try
3681 { 3690 {
3691 if (OnBinaryGenericMessage != null)
3692 {
3693 OnBinaryGenericMessage(this, method, msgBytes.ToArray());
3694 }
3682 handlerGenericMessage(sender, method, msg); 3695 handlerGenericMessage(sender, method, msg);
3683 return true; 3696 return true;
3684 } 3697 }