* 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.0.6.2-post-fixes
parent
f836e36c49
commit
f0864b5154
|
@ -153,12 +153,16 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(m_crashDir);
|
Directory.CreateDirectory(m_crashDir);
|
||||||
}
|
}
|
||||||
|
string log = Util.GetUniqueFilename(ex.GetType() + ".txt");
|
||||||
StreamWriter m_crashLog =
|
StreamWriter m_crashLog =
|
||||||
new StreamWriter(
|
new StreamWriter(
|
||||||
Path.Combine(m_crashDir, Util.GetUniqueFilename(ex.GetType() + ".txt"))
|
Path.Combine(m_crashDir, log)
|
||||||
);
|
);
|
||||||
|
|
||||||
m_crashLog.WriteLine(msg);
|
m_crashLog.WriteLine(msg);
|
||||||
m_crashLog.Close();
|
m_crashLog.Close();
|
||||||
|
|
||||||
|
File.Copy("opensim.ini", Path.Combine(m_crashDir, log + "_opensim.ini"));
|
||||||
}
|
}
|
||||||
catch (Exception e2)
|
catch (Exception e2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,6 +111,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected ulong m_activeGroupPowers;
|
protected ulong m_activeGroupPowers;
|
||||||
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
||||||
|
|
||||||
|
// LLClientView Only
|
||||||
|
public delegate void BinaryGenericMessage(Object sender, string method, byte[][] args);
|
||||||
|
|
||||||
/* Instantiated Designated Event Delegates */
|
/* Instantiated Designated Event Delegates */
|
||||||
//- used so we don't create new objects for each incoming packet and then toss it out later */
|
//- used so we don't create new objects for each incoming packet and then toss it out later */
|
||||||
|
|
||||||
|
@ -866,6 +869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// Previously ClientView.API partial class
|
// Previously ClientView.API partial class
|
||||||
public event GenericMessage OnGenericMessage;
|
public event GenericMessage OnGenericMessage;
|
||||||
|
public event BinaryGenericMessage OnBinaryGenericMessage;
|
||||||
public event Action<IClientAPI> OnLogout;
|
public event Action<IClientAPI> OnLogout;
|
||||||
public event ObjectPermissions OnObjectPermissions;
|
public event ObjectPermissions OnObjectPermissions;
|
||||||
public event Action<IClientAPI> OnConnectionClosed;
|
public event Action<IClientAPI> OnConnectionClosed;
|
||||||
|
@ -3665,20 +3669,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
|
||||||
if (m_genericPacketHandlers.Count == 0) return false;
|
if (m_genericPacketHandlers.Count == 0) return false;
|
||||||
|
|
||||||
handlerGenericMessage = null;
|
handlerGenericMessage = null;
|
||||||
|
|
||||||
string method = Util.FieldToString(gmpack.MethodData.Method).ToLower().Trim();
|
string method = Util.FieldToString(gmpack.MethodData.Method).ToLower().Trim();
|
||||||
|
|
||||||
if (m_genericPacketHandlers.TryGetValue(method, out handlerGenericMessage))
|
if (m_genericPacketHandlers.TryGetValue(method, out handlerGenericMessage))
|
||||||
{
|
{
|
||||||
List<string> msg = new List<string>();
|
List<string> msg = new List<string>();
|
||||||
|
List<byte[]> msgBytes = new List<byte[]>();
|
||||||
|
|
||||||
if (handlerGenericMessage != null)
|
if (handlerGenericMessage != null)
|
||||||
{
|
{
|
||||||
foreach (GenericMessagePacket.ParamListBlock block in gmpack.ParamList)
|
foreach (GenericMessagePacket.ParamListBlock block in gmpack.ParamList)
|
||||||
{
|
{
|
||||||
msg.Add(Util.FieldToString(block.Parameter));
|
msg.Add(Util.FieldToString(block.Parameter));
|
||||||
|
msgBytes.Add(block.Parameter);
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (OnBinaryGenericMessage != null)
|
||||||
|
{
|
||||||
|
OnBinaryGenericMessage(this, method, msgBytes.ToArray());
|
||||||
|
}
|
||||||
handlerGenericMessage(sender, method, msg);
|
handlerGenericMessage(sender, method, msg);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue