* Added "show queues" command that shows throttling queues for all clients.
*** This only works for LLCLientView at the moment ***0.6.0-stable
parent
9eced15408
commit
8acb60df0d
|
@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
|
||||||
/// That is something that cannot be determined within this class. So
|
/// That is something that cannot be determined within this class. So
|
||||||
/// all attempts to use the console MUST be verified.
|
/// all attempts to use the console MUST be verified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Notice(string msg)
|
protected void Notice(string msg)
|
||||||
{
|
{
|
||||||
if (m_console != null)
|
if (m_console != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ using OpenSim.Framework.Statistics;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
|
||||||
using Timer=System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace OpenSim
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,8 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
||||||
|
|
||||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
public OpenSim(IConfigSource configSource)
|
||||||
|
: base(configSource)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ namespace OpenSim
|
||||||
base.StartupSpecific();
|
base.StartupSpecific();
|
||||||
|
|
||||||
//Run Startup Commands
|
//Run Startup Commands
|
||||||
if (String.IsNullOrEmpty( m_startupCommandsFile ))
|
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||||
{
|
{
|
||||||
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
||||||
}
|
}
|
||||||
|
@ -121,7 +122,7 @@ namespace OpenSim
|
||||||
RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving");
|
RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving");
|
||||||
|
|
||||||
// For now, start at the 'root' level by default
|
// For now, start at the 'root' level by default
|
||||||
ChangeSelectedRegion(new string[] {"root"});
|
ChangeSelectedRegion(new string[] { "root" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunAutoTimerScript(object sender, EventArgs e)
|
private void RunAutoTimerScript(object sender, EventArgs e)
|
||||||
|
@ -138,7 +139,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
for (int i = 0; i < cmdparams.Length; i++)
|
for (int i = 0; i < cmdparams.Length; i++)
|
||||||
{
|
{
|
||||||
m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">");
|
m_log.Info("[EchoTest]: <arg" + i + ">" + cmdparams[i] + "</arg" + i + ">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +217,7 @@ namespace OpenSim
|
||||||
public override void RunCmd(string command, string[] cmdparams)
|
public override void RunCmd(string command, string[] cmdparams)
|
||||||
{
|
{
|
||||||
base.RunCmd(command, cmdparams);
|
base.RunCmd(command, cmdparams);
|
||||||
RunPluginCommands(command , cmdparams);
|
RunPluginCommands(command, cmdparams);
|
||||||
|
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
|
@ -373,9 +374,9 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||||
// if (c == null)
|
// if (c == null)
|
||||||
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
||||||
IConfig c;
|
IConfig c;
|
||||||
IConfigSource source = new IniConfigSource();
|
IConfigSource source = new IniConfigSource();
|
||||||
c = source.AddConfig(cmdparams[1]);
|
c = source.AddConfig(cmdparams[1]);
|
||||||
|
@ -466,10 +467,10 @@ namespace OpenSim
|
||||||
m_commsManager.AddInventoryService(cmdparams[0]);
|
m_commsManager.AddInventoryService(cmdparams[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "reset":
|
case "reset":
|
||||||
Reset(cmdparams);
|
Reset(cmdparams);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
string[] tmpPluginArgs = new string[cmdparams.Length + 1];
|
string[] tmpPluginArgs = new string[cmdparams.Length + 1];
|
||||||
|
@ -520,7 +521,7 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execute switch for some of the reset commands
|
/// Execute switch for some of the reset commands
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -533,17 +534,17 @@ namespace OpenSim
|
||||||
switch (args[0])
|
switch (args[0])
|
||||||
{
|
{
|
||||||
case "user":
|
case "user":
|
||||||
|
|
||||||
switch (args[1])
|
switch (args[1])
|
||||||
{
|
{
|
||||||
case "password":
|
case "password":
|
||||||
ResetUserPassword(args);
|
ResetUserPassword(args);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Turn on some debugging values for OpenSim.
|
/// Turn on some debugging values for OpenSim.
|
||||||
|
@ -728,9 +729,49 @@ namespace OpenSim
|
||||||
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "queues":
|
||||||
|
Notice(GetQueuesReport());
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetQueuesReport()
|
||||||
|
{
|
||||||
|
string report = String.Empty;
|
||||||
|
|
||||||
|
m_sceneManager.ForEachScene(delegate(Scene scene)
|
||||||
|
{
|
||||||
|
scene.ForEachClient(delegate(IClientAPI client)
|
||||||
|
{
|
||||||
|
if (client is IStatsCollector)
|
||||||
|
{
|
||||||
|
report = report + client.FirstName +
|
||||||
|
" " + client.LastName + "\n";
|
||||||
|
|
||||||
|
IStatsCollector stats =
|
||||||
|
(IStatsCollector)client;
|
||||||
|
|
||||||
|
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
|
||||||
|
"Send",
|
||||||
|
"In",
|
||||||
|
"Out",
|
||||||
|
"Resend",
|
||||||
|
"Land",
|
||||||
|
"Wind",
|
||||||
|
"Cloud",
|
||||||
|
"Task",
|
||||||
|
"Texture",
|
||||||
|
"Asset");
|
||||||
|
report = report + stats.Report() +
|
||||||
|
"\n\n";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return report;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new user
|
/// Create a new user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -747,19 +788,19 @@ namespace OpenSim
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
||||||
else firstName = cmdparams[1];
|
else firstName = cmdparams[1];
|
||||||
|
|
||||||
if ( cmdparams.Length < 3 )
|
if (cmdparams.Length < 3)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
||||||
else lastName = cmdparams[2];
|
else lastName = cmdparams[2];
|
||||||
|
|
||||||
if ( cmdparams.Length < 4 )
|
if (cmdparams.Length < 4)
|
||||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
password = MainConsole.Instance.PasswdPrompt("Password");
|
||||||
else password = cmdparams[3];
|
else password = cmdparams[3];
|
||||||
|
|
||||||
if ( cmdparams.Length < 5 )
|
if (cmdparams.Length < 5)
|
||||||
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
||||||
else regX = Convert.ToUInt32(cmdparams[4]);
|
else regX = Convert.ToUInt32(cmdparams[4]);
|
||||||
|
|
||||||
if ( cmdparams.Length < 6 )
|
if (cmdparams.Length < 6)
|
||||||
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
||||||
else regY = Convert.ToUInt32(cmdparams[5]);
|
else regY = Convert.ToUInt32(cmdparams[5]);
|
||||||
|
|
||||||
|
@ -772,7 +813,7 @@ namespace OpenSim
|
||||||
m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName);
|
m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reset a user password.
|
/// Reset a user password.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -782,21 +823,21 @@ namespace OpenSim
|
||||||
string firstName;
|
string firstName;
|
||||||
string lastName;
|
string lastName;
|
||||||
string newPassword;
|
string newPassword;
|
||||||
|
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.CmdPrompt("First name");
|
||||||
else firstName = cmdparams[2];
|
else firstName = cmdparams[2];
|
||||||
|
|
||||||
if ( cmdparams.Length < 4 )
|
if (cmdparams.Length < 4)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
||||||
else lastName = cmdparams[3];
|
else lastName = cmdparams[3];
|
||||||
|
|
||||||
if ( cmdparams.Length < 5 )
|
if (cmdparams.Length < 5)
|
||||||
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
||||||
else newPassword = cmdparams[4];
|
else newPassword = cmdparams[4];
|
||||||
|
|
||||||
m_commsManager.ResetUserPassword(firstName, lastName, newPassword);
|
m_commsManager.ResetUserPassword(firstName, lastName, newPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SaveXml(string[] cmdparams)
|
protected void SaveXml(string[] cmdparams)
|
||||||
{
|
{
|
||||||
|
@ -828,14 +869,14 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 2)
|
if (cmdparams.Length > 2)
|
||||||
{
|
{
|
||||||
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
|
loadOffset.X = (float)Convert.ToDecimal(cmdparams[2]);
|
||||||
if (cmdparams.Length > 3)
|
if (cmdparams.Length > 3)
|
||||||
{
|
{
|
||||||
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[3]);
|
loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]);
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 4)
|
if (cmdparams.Length > 4)
|
||||||
{
|
{
|
||||||
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
|
loadOffset.Z = (float)Convert.ToDecimal(cmdparams[4]);
|
||||||
}
|
}
|
||||||
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||||
loadOffset.Z + ">");
|
loadOffset.Z + ">");
|
||||||
|
@ -904,7 +945,7 @@ namespace OpenSim
|
||||||
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
|
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load inventory from an inventory file archive
|
/// Load inventory from an inventory file archive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -917,16 +958,16 @@ namespace OpenSim
|
||||||
m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]");
|
m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string firstName = cmdparams[0];
|
string firstName = cmdparams[0];
|
||||||
string lastName = cmdparams[1];
|
string lastName = cmdparams[1];
|
||||||
string invPath = cmdparams[2];
|
string invPath = cmdparams[2];
|
||||||
string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
||||||
|
|
||||||
new InventoryArchiveReadRequest(
|
new InventoryArchiveReadRequest(
|
||||||
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
|
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
|
||||||
firstName, lastName, invPath, loadPath);
|
firstName, lastName, invPath, loadPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save inventory to a file archive
|
/// Save inventory to a file archive
|
||||||
|
@ -940,17 +981,17 @@ namespace OpenSim
|
||||||
m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]");
|
m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string firstName = cmdparams[0];
|
string firstName = cmdparams[0];
|
||||||
string lastName = cmdparams[1];
|
string lastName = cmdparams[1];
|
||||||
string invPath = cmdparams[2];
|
string invPath = cmdparams[2];
|
||||||
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
||||||
|
|
||||||
new InventoryArchiveWriteRequest(
|
new InventoryArchiveWriteRequest(
|
||||||
m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(
|
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
|
||||||
firstName, lastName, invPath, savePath);
|
firstName, lastName, invPath, savePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string CombineParams(string[] commandParams, int pos)
|
private static string CombineParams(string[] commandParams, int pos)
|
||||||
{
|
{
|
||||||
string result = String.Empty;
|
string result = String.Empty;
|
||||||
|
@ -971,7 +1012,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
ConsolePluginCommand bestMatch = null;
|
ConsolePluginCommand bestMatch = null;
|
||||||
int bestLength = 0;
|
int bestLength = 0;
|
||||||
String cmdWithParams = cmd + " " + String.Join(" ",withParams);
|
String cmdWithParams = cmd + " " + String.Join(" ", withParams);
|
||||||
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
|
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
|
||||||
{
|
{
|
||||||
int matchLen = cmdinfo.matchLength(cmdWithParams);
|
int matchLen = cmdinfo.matchLength(cmdWithParams);
|
||||||
|
@ -982,7 +1023,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bestMatch == null) return false;
|
if (bestMatch == null) return false;
|
||||||
bestMatch.Run(cmd,withParams);//.Substring(bestLength));
|
bestMatch.Run(cmd, withParams);//.Substring(bestLength));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// Handles new client connections
|
/// Handles new client connections
|
||||||
/// Constructor takes a single Packet and authenticates everything
|
/// Constructor takes a single Packet and authenticates everything
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLClientView : IClientAPI
|
public class LLClientView : IClientAPI, IStatsCollector
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private readonly UUID m_sessionId;
|
private readonly UUID m_sessionId;
|
||||||
private readonly UUID m_secureSessionId = UUID.Zero;
|
private readonly UUID m_secureSessionId = UUID.Zero;
|
||||||
//private AgentAssetUpload UploadAssets;
|
//private AgentAssetUpload UploadAssets;
|
||||||
|
|
||||||
private int m_debugPacketLevel;
|
private int m_debugPacketLevel;
|
||||||
|
|
||||||
private readonly AssetCache m_assetCache;
|
private readonly AssetCache m_assetCache;
|
||||||
// private InventoryCache m_inventoryCache;
|
// private InventoryCache m_inventoryCache;
|
||||||
private int m_cachedTextureSerial;
|
private int m_cachedTextureSerial;
|
||||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected UUID m_activeGroupID = UUID.Zero;
|
protected UUID m_activeGroupID = UUID.Zero;
|
||||||
protected string m_activeGroupName = String.Empty;
|
protected string m_activeGroupName = String.Empty;
|
||||||
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>();
|
||||||
|
|
||||||
/* 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 */
|
||||||
|
@ -419,8 +419,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_circuitCode = circuitCode;
|
m_circuitCode = circuitCode;
|
||||||
|
|
||||||
m_userEndPoint = remoteEP;
|
m_userEndPoint = remoteEP;
|
||||||
m_proxyEndPoint = proxyEP;
|
m_proxyEndPoint = proxyEP;
|
||||||
|
|
||||||
m_firstName = sessionInfo.LoginInfo.First;
|
m_firstName = sessionInfo.LoginInfo.First;
|
||||||
m_lastName = sessionInfo.LoginInfo.Last;
|
m_lastName = sessionInfo.LoginInfo.Last;
|
||||||
m_startpos = sessionInfo.LoginInfo.StartPos;
|
m_startpos = sessionInfo.LoginInfo.StartPos;
|
||||||
|
@ -672,12 +672,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue();
|
LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue();
|
||||||
|
|
||||||
if (nextPacket.Incoming)
|
if (nextPacket.Incoming)
|
||||||
{
|
{
|
||||||
DebugPacket("IN", nextPacket.Packet);
|
DebugPacket("IN", nextPacket.Packet);
|
||||||
m_PacketHandler.ProcessInPacket(nextPacket);
|
m_PacketHandler.ProcessInPacket(nextPacket);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugPacket("OUT", nextPacket.Packet);
|
DebugPacket("OUT", nextPacket.Packet);
|
||||||
|
@ -768,7 +768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// This sets up all the timers
|
// This sets up all the timers
|
||||||
InitNewClient();
|
InitNewClient();
|
||||||
ClientLoop();
|
ClientLoop();
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
if (e is ThreadAbortException)
|
if (e is ThreadAbortException)
|
||||||
|
@ -1220,7 +1220,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(map, patches);
|
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(map, patches);
|
||||||
layerpack.Header.Zerocoded = true;
|
layerpack.Header.Zerocoded = true;
|
||||||
|
|
||||||
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2162,17 +2162,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(viewertime, ThrottleOutPacketType.Task);
|
OutPacket(viewertime, ThrottleOutPacketType.Task);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
|
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
|
||||||
{
|
{
|
||||||
ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
|
ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
|
||||||
packet.Effect = effectBlocks;
|
packet.Effect = effectBlocks;
|
||||||
|
|
||||||
packet.AgentData.AgentID = AgentId;
|
packet.AgentData.AgentID = AgentId;
|
||||||
packet.AgentData.SessionID = SessionId;
|
packet.AgentData.SessionID = SessionId;
|
||||||
packet.Header.Reliable = false;
|
packet.Header.Reliable = false;
|
||||||
packet.Header.Zerocoded = true;
|
packet.Header.Zerocoded = true;
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
||||||
|
@ -2205,7 +2205,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Gesture
|
// Gesture
|
||||||
|
|
||||||
#region Appearance/ Wearables Methods
|
#region Appearance/ Wearables Methods
|
||||||
|
|
||||||
public void SendWearables(AvatarWearable[] wearables, int serial)
|
public void SendWearables(AvatarWearable[] wearables, int serial)
|
||||||
{
|
{
|
||||||
AgentWearablesUpdatePacket aw = (AgentWearablesUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentWearablesUpdate);
|
AgentWearablesUpdatePacket aw = (AgentWearablesUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentWearablesUpdate);
|
||||||
|
@ -2223,10 +2223,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
awb.AssetID = wearables[i].AssetID;
|
awb.AssetID = wearables[i].AssetID;
|
||||||
awb.ItemID = wearables[i].ItemID;
|
awb.ItemID = wearables[i].ItemID;
|
||||||
aw.WearableData[i] = awb;
|
aw.WearableData[i] = awb;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
||||||
// awb.ItemID, awb.AssetID, i, Name);
|
// awb.ItemID, awb.AssetID, i, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(aw, ThrottleOutPacketType.Task);
|
OutPacket(aw, ThrottleOutPacketType.Task);
|
||||||
|
@ -2327,10 +2327,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
Vector3 velocity, Quaternion rotation)
|
Vector3 velocity, Quaternion rotation)
|
||||||
{
|
{
|
||||||
if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
|
if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
|
||||||
rotation = Quaternion.Identity;
|
rotation = Quaternion.Identity;
|
||||||
|
|
||||||
//m_log.DebugFormat("[CLIENT]: Sending rotation {0} for {1} to {2}", rotation, localID, Name);
|
//m_log.DebugFormat("[CLIENT]: Sending rotation {0} for {1} to {2}", rotation, localID, Name);
|
||||||
|
|
||||||
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
|
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
|
||||||
CreateAvatarImprovedBlock(localID, position, velocity, rotation);
|
CreateAvatarImprovedBlock(localID, position, velocity, rotation);
|
||||||
ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
|
ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
|
||||||
|
@ -2342,7 +2342,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
terse.Header.Reliable = false;
|
terse.Header.Reliable = false;
|
||||||
terse.Header.Zerocoded = true;
|
terse.Header.Zerocoded = true;
|
||||||
|
|
||||||
OutPacket(terse, ThrottleOutPacketType.Task);
|
OutPacket(terse, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2566,7 +2566,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
im.Header.Zerocoded = true;
|
im.Header.Zerocoded = true;
|
||||||
OutPacket(im, ThrottleOutPacketType.Texture);
|
OutPacket(im, ThrottleOutPacketType.Texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
|
public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
|
||||||
{
|
{
|
||||||
ImagePacketPacket im = new ImagePacketPacket();
|
ImagePacketPacket im = new ImagePacketPacket();
|
||||||
|
@ -2574,13 +2574,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
im.ImageID.Packet = partNumber;
|
im.ImageID.Packet = partNumber;
|
||||||
im.ImageID.ID = imageUuid;
|
im.ImageID.ID = imageUuid;
|
||||||
im.ImageData.Data = imageData;
|
im.ImageData.Data = imageData;
|
||||||
|
|
||||||
OutPacket(im, ThrottleOutPacketType.Texture);
|
OutPacket(im, ThrottleOutPacketType.Texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendImageNotFound(UUID imageid)
|
public void SendImageNotFound(UUID imageid)
|
||||||
{
|
{
|
||||||
ImageNotInDatabasePacket notFoundPacket
|
ImageNotInDatabasePacket notFoundPacket
|
||||||
= (ImageNotInDatabasePacket)PacketPool.Instance.GetPacket(PacketType.ImageNotInDatabase);
|
= (ImageNotInDatabasePacket)PacketPool.Instance.GetPacket(PacketType.ImageNotInDatabase);
|
||||||
|
|
||||||
notFoundPacket.ImageID.ID = imageid;
|
notFoundPacket.ImageID.ID = imageid;
|
||||||
|
@ -2603,9 +2603,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
pack.Region.ObjectCapacity = stats.ObjectCapacity;
|
pack.Region.ObjectCapacity = stats.ObjectCapacity;
|
||||||
//pack.Region = //stats.RegionBlock;
|
//pack.Region = //stats.RegionBlock;
|
||||||
pack.Stat = stats.StatsBlock;
|
pack.Stat = stats.StatsBlock;
|
||||||
|
|
||||||
pack.Header.Reliable = false;
|
pack.Header.Reliable = false;
|
||||||
|
|
||||||
OutPacket(pack, ThrottleOutPacketType.Task);
|
OutPacket(pack, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2732,7 +2732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
||||||
{
|
{
|
||||||
List<UUID>BannedUsers = new List<UUID>();
|
List<UUID> BannedUsers = new List<UUID>();
|
||||||
|
|
||||||
for (int i = 0; i < bl.Length; i++)
|
for (int i = 0; i < bl.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -2888,7 +2888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned;
|
updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned;
|
||||||
updatePacket.ParcelData.LandingType = (byte)landData.LandingType;
|
updatePacket.ParcelData.LandingType = (byte)landData.LandingType;
|
||||||
updatePacket.ParcelData.LocalID = landData.LocalID;
|
updatePacket.ParcelData.LocalID = landData.LocalID;
|
||||||
|
|
||||||
if (landData.Area > 0)
|
if (landData.Area > 0)
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
|
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
|
||||||
|
@ -2897,10 +2897,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.MaxPrims = 0;
|
updatePacket.ParcelData.MaxPrims = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
|
updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
|
||||||
updatePacket.ParcelData.MediaID = landData.MediaID;
|
updatePacket.ParcelData.MediaID = landData.MediaID;
|
||||||
updatePacket.ParcelData.MediaURL = LLUtil.StringToPacketBytes(landData.MediaURL);
|
updatePacket.ParcelData.MediaURL = LLUtil.StringToPacketBytes(landData.MediaURL);
|
||||||
updatePacket.ParcelData.MusicURL = LLUtil.StringToPacketBytes(landData.MusicURL);
|
updatePacket.ParcelData.MusicURL = LLUtil.StringToPacketBytes(landData.MusicURL);
|
||||||
updatePacket.ParcelData.Name = Utils.StringToBytes(landData.Name);
|
updatePacket.ParcelData.Name = Utils.StringToBytes(landData.Name);
|
||||||
updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime;
|
updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime;
|
||||||
|
@ -2946,7 +2946,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
updatePacket.ParcelData.UserLocation = landData.UserLocation;
|
updatePacket.ParcelData.UserLocation = landData.UserLocation;
|
||||||
updatePacket.ParcelData.UserLookAt = landData.UserLookAt;
|
updatePacket.ParcelData.UserLookAt = landData.UserLookAt;
|
||||||
updatePacket.Header.Zerocoded = true;
|
updatePacket.Header.Zerocoded = true;
|
||||||
|
|
||||||
OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
|
OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3475,7 +3475,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
||||||
{
|
{
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket)pack;
|
||||||
handlerGenericMessage = OnGenericMessage;
|
handlerGenericMessage = OnGenericMessage;
|
||||||
|
|
||||||
List<string> msg = new List<string>();
|
List<string> msg = new List<string>();
|
||||||
|
@ -3888,7 +3888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public virtual void InPacket(object NewPack)
|
public virtual void InPacket(object NewPack)
|
||||||
{
|
{
|
||||||
// Cast NewPack to Packet.
|
// Cast NewPack to Packet.
|
||||||
m_PacketHandler.InPacket((Packet) NewPack);
|
m_PacketHandler.InPacket((Packet)NewPack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3981,7 +3981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Main packet processing conditional
|
// Main packet processing conditional
|
||||||
switch (Pack.Type)
|
switch (Pack.Type)
|
||||||
{
|
{
|
||||||
#region Scene/Avatar
|
#region Scene/Avatar
|
||||||
|
|
||||||
case PacketType.GenericMessage:
|
case PacketType.GenericMessage:
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
|
||||||
|
@ -4106,7 +4106,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
case PacketType.DeclineFriendship:
|
case PacketType.DeclineFriendship:
|
||||||
DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
|
DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
|
||||||
|
|
||||||
if (OnDenyFriendRequest != null)
|
if (OnDenyFriendRequest != null)
|
||||||
{
|
{
|
||||||
OnDenyFriendRequest(this,
|
OnDenyFriendRequest(this,
|
||||||
|
@ -4114,7 +4114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
dfriendpack.TransactionBlock.TransactionID,
|
dfriendpack.TransactionBlock.TransactionID,
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.TerminateFriendship:
|
case PacketType.TerminateFriendship:
|
||||||
TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
|
TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
|
||||||
|
@ -4127,7 +4127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
|
handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.RezObject:
|
case PacketType.RezObject:
|
||||||
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
|
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
|
||||||
|
|
||||||
|
@ -4141,9 +4141,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
rezPacket.RezData.FromTaskID);
|
rezPacket.RezData.FromTaskID);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.DeRezObject:
|
case PacketType.DeRezObject:
|
||||||
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
|
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
|
||||||
handlerDeRezObject = OnDeRezObject;
|
handlerDeRezObject = OnDeRezObject;
|
||||||
if (handlerDeRezObject != null)
|
if (handlerDeRezObject != null)
|
||||||
{
|
{
|
||||||
|
@ -4157,7 +4157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ModifyLand:
|
case PacketType.ModifyLand:
|
||||||
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
||||||
//m_log.Info("[LAND]: LAND:" + modify.ToString());
|
//m_log.Info("[LAND]: LAND:" + modify.ToString());
|
||||||
|
@ -4182,7 +4182,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.RegionHandshakeReply:
|
case PacketType.RegionHandshakeReply:
|
||||||
|
|
||||||
handlerRegionHandShakeReply = OnRegionHandShakeReply;
|
handlerRegionHandShakeReply = OnRegionHandShakeReply;
|
||||||
|
@ -4192,14 +4192,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.AgentWearablesRequest:
|
case PacketType.AgentWearablesRequest:
|
||||||
handlerRequestWearables = OnRequestWearables;
|
handlerRequestWearables = OnRequestWearables;
|
||||||
|
|
||||||
if (handlerRequestWearables != null)
|
if (handlerRequestWearables != null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Wearables requested by {0}", Name);
|
m_log.DebugFormat("[APPEARANCE]: Wearables requested by {0}", Name);
|
||||||
|
|
||||||
handlerRequestWearables();
|
handlerRequestWearables();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4211,7 +4211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.AgentSetAppearance:
|
case PacketType.AgentSetAppearance:
|
||||||
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
|
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
|
||||||
|
|
||||||
|
@ -4494,9 +4494,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Objects/m_sceneObjects
|
#region Objects/m_sceneObjects
|
||||||
|
|
||||||
case PacketType.ObjectLink:
|
case PacketType.ObjectLink:
|
||||||
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
||||||
|
@ -4789,10 +4789,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.ObjectName:
|
case PacketType.ObjectName:
|
||||||
ObjectNamePacket objName = (ObjectNamePacket)Pack;
|
ObjectNamePacket objName = (ObjectNamePacket)Pack;
|
||||||
|
|
||||||
handlerObjectName = null;
|
handlerObjectName = null;
|
||||||
for (int i = 0; i < objName.ObjectData.Length; i++)
|
for (int i = 0; i < objName.ObjectData.Length; i++)
|
||||||
{
|
{
|
||||||
handlerObjectName = OnObjectName;
|
handlerObjectName = OnObjectName;
|
||||||
if (handlerObjectName != null)
|
if (handlerObjectName != null)
|
||||||
{
|
{
|
||||||
|
@ -4924,7 +4924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
|
ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
|
||||||
|
|
||||||
handlerObjectClickAction = OnObjectClickAction;
|
handlerObjectClickAction = OnObjectClickAction;
|
||||||
if (handlerObjectClickAction != null)
|
if (handlerObjectClickAction != null)
|
||||||
{
|
{
|
||||||
foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData)
|
foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData)
|
||||||
{
|
{
|
||||||
|
@ -4950,9 +4950,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Inventory/Asset/Other related packets
|
#region Inventory/Asset/Other related packets
|
||||||
|
|
||||||
case PacketType.RequestImage:
|
case PacketType.RequestImage:
|
||||||
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
||||||
|
@ -5009,7 +5009,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (ti.OwnerID != AgentId)
|
if (ti.OwnerID != AgentId)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ti.AssetID != requestID)
|
if (ti.AssetID != requestID)
|
||||||
|
@ -5021,12 +5021,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (userInfo == null)
|
if (userInfo == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[CLIENT]: Could not resolve user {0} for caps inventory update",
|
"[CLIENT]: Could not resolve user {0} for caps inventory update",
|
||||||
AgentId);
|
AgentId);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userInfo.RootFolder == null)
|
if (userInfo.RootFolder == null)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5565,7 +5565,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
case PacketType.UUIDNameRequest:
|
case PacketType.UUIDNameRequest:
|
||||||
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
||||||
|
@ -5579,7 +5579,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region Parcel related packets
|
#region Parcel related packets
|
||||||
|
|
||||||
case PacketType.RegionHandleRequest:
|
case PacketType.RegionHandleRequest:
|
||||||
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
||||||
|
@ -5774,9 +5774,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Estate Packets
|
#region Estate Packets
|
||||||
|
|
||||||
case PacketType.EstateOwnerMessage:
|
case PacketType.EstateOwnerMessage:
|
||||||
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
||||||
|
@ -5802,21 +5802,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// case "texturebase":
|
// case "texturebase":
|
||||||
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||||
// {
|
// {
|
||||||
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||||
// {
|
// {
|
||||||
// string s = Utils.BytesToString(block.Parameter);
|
// string s = Utils.BytesToString(block.Parameter);
|
||||||
// string[] splitField = s.Split(' ');
|
// string[] splitField = s.Split(' ');
|
||||||
// if (splitField.Length == 2)
|
// if (splitField.Length == 2)
|
||||||
// {
|
// {
|
||||||
// UUID tempUUID = new UUID(splitField[1]);
|
// UUID tempUUID = new UUID(splitField[1]);
|
||||||
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// break;
|
// break;
|
||||||
case "texturedetail":
|
case "texturedetail":
|
||||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||||
{
|
{
|
||||||
|
@ -6066,9 +6066,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GodPackets
|
#region GodPackets
|
||||||
|
|
||||||
case PacketType.RequestGodlikePowers:
|
case PacketType.RequestGodlikePowers:
|
||||||
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
||||||
|
@ -6114,9 +6114,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Economy/Transaction Packets
|
#region Economy/Transaction Packets
|
||||||
|
|
||||||
case PacketType.MoneyBalanceRequest:
|
case PacketType.MoneyBalanceRequest:
|
||||||
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
||||||
|
@ -6187,9 +6187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Script Packets
|
#region Script Packets
|
||||||
|
|
||||||
case PacketType.GetScriptRunning:
|
case PacketType.GetScriptRunning:
|
||||||
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
||||||
|
@ -6218,9 +6218,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Gesture Managment
|
#region Gesture Managment
|
||||||
|
|
||||||
case PacketType.ActivateGestures:
|
case PacketType.ActivateGestures:
|
||||||
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
||||||
|
@ -6258,10 +6258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region unimplemented handlers
|
#region unimplemented handlers
|
||||||
|
|
||||||
case PacketType.StartPingCheck:
|
case PacketType.StartPingCheck:
|
||||||
// Send the client the ping response back
|
// Send the client the ping response back
|
||||||
|
@ -6279,10 +6279,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
|
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case PacketType.GenericMessage:
|
//case PacketType.GenericMessage:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
||||||
//break;
|
//break;
|
||||||
case PacketType.MapItemRequest:
|
case PacketType.MapItemRequest:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
|
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
|
||||||
|
@ -6290,8 +6290,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerMapItemRequest = OnMapItemRequest;
|
handlerMapItemRequest = OnMapItemRequest;
|
||||||
if (handlerMapItemRequest != null)
|
if (handlerMapItemRequest != null)
|
||||||
{
|
{
|
||||||
handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
||||||
mirpk.AgentData.Godlike,mirpk.RequestData.ItemType,
|
mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
|
||||||
mirpk.RequestData.RegionHandle);
|
mirpk.RequestData.RegionHandle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6406,7 +6406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID);
|
OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ParcelSetOtherCleanTime:
|
case PacketType.ParcelSetOtherCleanTime:
|
||||||
ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack;
|
ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack;
|
||||||
handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime;
|
handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime;
|
||||||
|
@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPool.Instance.ReturnPacket(Pack);
|
PacketPool.Instance.ReturnPacket(Pack);
|
||||||
|
@ -7209,7 +7209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
||||||
commandMessagePacket.CommandBlock.Flags = flags;
|
commandMessagePacket.CommandBlock.Flags = flags;
|
||||||
commandMessagePacket.CommandBlock.Command =(uint) command;
|
commandMessagePacket.CommandBlock.Command = (uint)command;
|
||||||
commandMessagePacket.CommandBlock.Time = time;
|
commandMessagePacket.CommandBlock.Time = time;
|
||||||
|
|
||||||
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
||||||
|
@ -7238,7 +7238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#region Camera
|
#region Camera
|
||||||
|
|
||||||
public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
|
public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
|
||||||
{
|
{
|
||||||
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -7256,7 +7256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendClearFollowCamProperties (UUID objectID)
|
public void SendClearFollowCamProperties(UUID objectID)
|
||||||
{
|
{
|
||||||
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SendRegionHandle(UUID regionID, ulong handle) {
|
public void SendRegionHandle(UUID regionID, ulong handle)
|
||||||
|
{
|
||||||
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
||||||
reply.ReplyBlock.RegionID = regionID;
|
reply.ReplyBlock.RegionID = regionID;
|
||||||
reply.ReplyBlock.RegionHandle = handle;
|
reply.ReplyBlock.RegionHandle = handle;
|
||||||
|
@ -7321,14 +7322,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
switch (option)
|
switch (option)
|
||||||
{
|
{
|
||||||
case "ReliableIsImportant":
|
case "ReliableIsImportant":
|
||||||
bool val;
|
bool val;
|
||||||
|
|
||||||
if (bool.TryParse(value, out val))
|
if (bool.TryParse(value, out val))
|
||||||
m_PacketHandler.ReliableIsImportant = val;
|
m_PacketHandler.ReliableIsImportant = val;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7338,7 +7339,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
case "ReliableIsImportant":
|
case "ReliableIsImportant":
|
||||||
return m_PacketHandler.ReliableIsImportant.ToString();
|
return m_PacketHandler.ReliableIsImportant.ToString();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7586,7 +7587,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
mirplk.AgentData.AgentID = AgentId;
|
mirplk.AgentData.AgentID = AgentId;
|
||||||
mirplk.RequestData.ItemType = mapitemtype;
|
mirplk.RequestData.ItemType = mapitemtype;
|
||||||
mirplk.Data = new MapItemReplyPacket.DataBlock[replies.Length];
|
mirplk.Data = new MapItemReplyPacket.DataBlock[replies.Length];
|
||||||
for (int i = 0; i < replies.Length; i++ )
|
for (int i = 0; i < replies.Length; i++)
|
||||||
{
|
{
|
||||||
MapItemReplyPacket.DataBlock mrdata = new MapItemReplyPacket.DataBlock();
|
MapItemReplyPacket.DataBlock mrdata = new MapItemReplyPacket.DataBlock();
|
||||||
mrdata.X = replies[i].x;
|
mrdata.X = replies[i].x;
|
||||||
|
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
KillPacket kp = new KillPacket();
|
KillPacket kp = new KillPacket();
|
||||||
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Report()
|
||||||
|
{
|
||||||
|
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
|
||||||
|
return handler.PacketQueue.GetStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -576,7 +576,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// See IPullStatsProvider
|
// See IPullStatsProvider
|
||||||
public string GetStats()
|
public string GetStats()
|
||||||
{
|
{
|
||||||
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
|
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
|
||||||
SendQueue.Count(),
|
SendQueue.Count(),
|
||||||
IncomingPacketQueue.Count,
|
IncomingPacketQueue.Count,
|
||||||
OutgoingPacketQueue.Count,
|
OutgoingPacketQueue.Count,
|
||||||
|
|
|
@ -4047,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ForEachClient(Action<IClientAPI> action)
|
public void ForEachClient(Action<IClientAPI> action)
|
||||||
{
|
{
|
||||||
m_innerScene.ForEachClient(action);
|
m_innerScene.ForEachClient(action);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2589,6 +2589,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Data"/>
|
<Reference name="OpenSim.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
|
|
Loading…
Reference in New Issue