* Added "show queues" command that shows throttling queues for all clients.

*** This only works for LLCLientView at the moment ***
0.6.0-stable
lbsa71 2008-12-18 13:02:26 +00:00
parent 9eced15408
commit 8acb60df0d
6 changed files with 197 additions and 148 deletions

View File

@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
/// </summary>
private void Notice(string msg)
protected void Notice(string msg)
{
if (m_console != null)
{

View File

@ -41,7 +41,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
using Timer=System.Timers.Timer;
using Timer = System.Timers.Timer;
namespace OpenSim
{
@ -63,7 +63,8 @@ namespace OpenSim
/// </summary>
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();
//Run Startup Commands
if (String.IsNullOrEmpty( m_startupCommandsFile ))
if (String.IsNullOrEmpty(m_startupCommandsFile))
{
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");
// For now, start at the 'root' level by default
ChangeSelectedRegion(new string[] {"root"});
ChangeSelectedRegion(new string[] { "root" });
}
private void RunAutoTimerScript(object sender, EventArgs e)
@ -138,7 +139,7 @@ namespace OpenSim
{
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)
{
base.RunCmd(command, cmdparams);
RunPluginCommands(command , cmdparams);
RunPluginCommands(command, cmdparams);
switch (command)
{
@ -373,9 +374,9 @@ namespace OpenSim
}
else
{
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
// if (c == null)
// c = DefaultConfig().AddConfig(cmdparams[1]);
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
// if (c == null)
// c = DefaultConfig().AddConfig(cmdparams[1]);
IConfig c;
IConfigSource source = new IniConfigSource();
c = source.AddConfig(cmdparams[1]);
@ -466,10 +467,10 @@ namespace OpenSim
m_commsManager.AddInventoryService(cmdparams[0]);
}
break;
case "reset":
Reset(cmdparams);
break;
break;
default:
string[] tmpPluginArgs = new string[cmdparams.Length + 1];
@ -520,7 +521,7 @@ namespace OpenSim
break;
}
}
/// <summary>
/// Execute switch for some of the reset commands
/// </summary>
@ -533,17 +534,17 @@ namespace OpenSim
switch (args[0])
{
case "user":
switch (args[1])
{
case "password":
ResetUserPassword(args);
break;
}
break;
}
}
}
/// <summary>
/// Turn on some debugging values for OpenSim.
@ -728,9 +729,49 @@ namespace OpenSim
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
});
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>
/// Create a new user
/// </summary>
@ -747,19 +788,19 @@ namespace OpenSim
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
else firstName = cmdparams[1];
if ( cmdparams.Length < 3 )
if (cmdparams.Length < 3)
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
else lastName = cmdparams[2];
if ( cmdparams.Length < 4 )
if (cmdparams.Length < 4)
password = MainConsole.Instance.PasswdPrompt("Password");
else password = cmdparams[3];
if ( cmdparams.Length < 5 )
if (cmdparams.Length < 5)
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
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()));
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);
}
}
/// <summary>
/// Reset a user password.
/// </summary>
@ -782,21 +823,21 @@ namespace OpenSim
string firstName;
string lastName;
string newPassword;
if (cmdparams.Length < 3)
firstName = MainConsole.Instance.CmdPrompt("First name");
else firstName = cmdparams[2];
if ( cmdparams.Length < 4 )
if (cmdparams.Length < 4)
lastName = MainConsole.Instance.CmdPrompt("Last name");
else lastName = cmdparams[3];
if ( cmdparams.Length < 5 )
if (cmdparams.Length < 5)
newPassword = MainConsole.Instance.PasswdPrompt("New password");
else newPassword = cmdparams[4];
m_commsManager.ResetUserPassword(firstName, lastName, newPassword);
}
}
protected void SaveXml(string[] cmdparams)
{
@ -828,14 +869,14 @@ namespace OpenSim
}
if (cmdparams.Length > 2)
{
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
loadOffset.X = (float)Convert.ToDecimal(cmdparams[2]);
if (cmdparams.Length > 3)
{
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[3]);
loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]);
}
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 + "," +
loadOffset.Z + ">");
@ -904,7 +945,7 @@ namespace OpenSim
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
}
}
/// <summary>
/// Load inventory from an inventory file archive
/// </summary>
@ -917,16 +958,16 @@ namespace OpenSim
m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]");
return;
}
string firstName = cmdparams[0];
string lastName = cmdparams[1];
string invPath = cmdparams[2];
string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
new InventoryArchiveReadRequest(
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
firstName, lastName, invPath, loadPath);
}
}
/// <summary>
/// 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>]");
return;
}
string firstName = cmdparams[0];
string lastName = cmdparams[1];
string invPath = cmdparams[2];
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
new InventoryArchiveWriteRequest(
m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
firstName, lastName, invPath, savePath);
}
private static string CombineParams(string[] commandParams, int pos)
{
string result = String.Empty;
@ -971,7 +1012,7 @@ namespace OpenSim
{
ConsolePluginCommand bestMatch = null;
int bestLength = 0;
String cmdWithParams = cmd + " " + String.Join(" ",withParams);
String cmdWithParams = cmd + " " + String.Join(" ", withParams);
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
{
int matchLen = cmdinfo.matchLength(cmdWithParams);
@ -982,7 +1023,7 @@ namespace OpenSim
}
}
if (bestMatch == null) return false;
bestMatch.Run(cmd,withParams);//.Substring(bestLength));
bestMatch.Run(cmd, withParams);//.Substring(bestLength));
return true;
}

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Handles new client connections
/// Constructor takes a single Packet and authenticates everything
/// </summary>
public class LLClientView : IClientAPI
public class LLClientView : IClientAPI, IStatsCollector
{
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_secureSessionId = UUID.Zero;
//private AgentAssetUpload UploadAssets;
private int m_debugPacketLevel;
private readonly AssetCache m_assetCache;
// private InventoryCache m_inventoryCache;
private int m_cachedTextureSerial;
@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected UUID m_activeGroupID = UUID.Zero;
protected string m_activeGroupName = String.Empty;
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 */
//- 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_userEndPoint = remoteEP;
m_proxyEndPoint = proxyEP;
m_proxyEndPoint = proxyEP;
m_firstName = sessionInfo.LoginInfo.First;
m_lastName = sessionInfo.LoginInfo.Last;
m_startpos = sessionInfo.LoginInfo.StartPos;
@ -672,12 +672,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
while (true)
{
LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue();
if (nextPacket.Incoming)
{
DebugPacket("IN", nextPacket.Packet);
m_PacketHandler.ProcessInPacket(nextPacket);
}
}
else
{
DebugPacket("OUT", nextPacket.Packet);
@ -768,7 +768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// This sets up all the timers
InitNewClient();
ClientLoop();
}
}
catch (System.Exception e)
{
if (e is ThreadAbortException)
@ -1220,7 +1220,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(map, patches);
layerpack.Header.Zerocoded = true;
OutPacket(layerpack, ThrottleOutPacketType.Land);
}
@ -2162,17 +2162,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(viewertime, ThrottleOutPacketType.Task);
*/
}
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
{
ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
packet.Effect = effectBlocks;
packet.AgentData.AgentID = AgentId;
packet.AgentData.SessionID = SessionId;
packet.Header.Reliable = false;
packet.Header.Zerocoded = true;
OutPacket(packet, ThrottleOutPacketType.Task);
OutPacket(packet, ThrottleOutPacketType.Task);
}
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
@ -2205,7 +2205,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Gesture
#region Appearance/ Wearables Methods
public void SendWearables(AvatarWearable[] wearables, int serial)
{
AgentWearablesUpdatePacket aw = (AgentWearablesUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentWearablesUpdate);
@ -2223,10 +2223,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
awb.AssetID = wearables[i].AssetID;
awb.ItemID = wearables[i].ItemID;
aw.WearableData[i] = awb;
// m_log.DebugFormat(
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
// awb.ItemID, awb.AssetID, i, Name);
// m_log.DebugFormat(
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
// awb.ItemID, awb.AssetID, i, Name);
}
OutPacket(aw, ThrottleOutPacketType.Task);
@ -2327,10 +2327,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Vector3 velocity, Quaternion rotation)
{
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);
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
CreateAvatarImprovedBlock(localID, position, velocity, rotation);
ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
@ -2342,7 +2342,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
terse.Header.Reliable = false;
terse.Header.Zerocoded = true;
OutPacket(terse, ThrottleOutPacketType.Task);
}
@ -2566,7 +2566,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
im.Header.Zerocoded = true;
OutPacket(im, ThrottleOutPacketType.Texture);
}
public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
{
ImagePacketPacket im = new ImagePacketPacket();
@ -2574,13 +2574,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
im.ImageID.Packet = partNumber;
im.ImageID.ID = imageUuid;
im.ImageData.Data = imageData;
OutPacket(im, ThrottleOutPacketType.Texture);
OutPacket(im, ThrottleOutPacketType.Texture);
}
public void SendImageNotFound(UUID imageid)
{
ImageNotInDatabasePacket notFoundPacket
ImageNotInDatabasePacket notFoundPacket
= (ImageNotInDatabasePacket)PacketPool.Instance.GetPacket(PacketType.ImageNotInDatabase);
notFoundPacket.ImageID.ID = imageid;
@ -2603,9 +2603,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
pack.Region.ObjectCapacity = stats.ObjectCapacity;
//pack.Region = //stats.RegionBlock;
pack.Stat = stats.StatsBlock;
pack.Header.Reliable = false;
OutPacket(pack, ThrottleOutPacketType.Task);
}
@ -2732,7 +2732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
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++)
{
@ -2888,7 +2888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned;
updatePacket.ParcelData.LandingType = (byte)landData.LandingType;
updatePacket.ParcelData.LocalID = landData.LocalID;
if (landData.Area > 0)
{
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
@ -2897,10 +2897,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
updatePacket.ParcelData.MaxPrims = 0;
}
updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
updatePacket.ParcelData.MediaID = landData.MediaID;
updatePacket.ParcelData.MediaURL = LLUtil.StringToPacketBytes(landData.MediaURL);
updatePacket.ParcelData.MediaID = landData.MediaID;
updatePacket.ParcelData.MediaURL = LLUtil.StringToPacketBytes(landData.MediaURL);
updatePacket.ParcelData.MusicURL = LLUtil.StringToPacketBytes(landData.MusicURL);
updatePacket.ParcelData.Name = Utils.StringToBytes(landData.Name);
updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime;
@ -2946,7 +2946,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.ParcelData.UserLocation = landData.UserLocation;
updatePacket.ParcelData.UserLookAt = landData.UserLookAt;
updatePacket.Header.Zerocoded = true;
OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
}
@ -3475,7 +3475,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
{
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
GenericMessagePacket gmpack = (GenericMessagePacket)pack;
handlerGenericMessage = OnGenericMessage;
List<string> msg = new List<string>();
@ -3888,7 +3888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public virtual void InPacket(object NewPack)
{
// 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
switch (Pack.Type)
{
#region Scene/Avatar
#region Scene/Avatar
case PacketType.GenericMessage:
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
@ -4106,7 +4106,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case PacketType.DeclineFriendship:
DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
if (OnDenyFriendRequest != null)
{
OnDenyFriendRequest(this,
@ -4114,7 +4114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
dfriendpack.TransactionBlock.TransactionID,
null);
}
break;
break;
case PacketType.TerminateFriendship:
TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
@ -4127,7 +4127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
}
break;
case PacketType.RezObject:
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
@ -4141,9 +4141,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
rezPacket.RezData.FromTaskID);
}
break;
case PacketType.DeRezObject:
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
handlerDeRezObject = OnDeRezObject;
if (handlerDeRezObject != null)
{
@ -4157,7 +4157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
break;
case PacketType.ModifyLand:
ModifyLandPacket modify = (ModifyLandPacket)Pack;
//m_log.Info("[LAND]: LAND:" + modify.ToString());
@ -4182,7 +4182,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.RegionHandshakeReply:
handlerRegionHandShakeReply = OnRegionHandShakeReply;
@ -4192,14 +4192,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.AgentWearablesRequest:
handlerRequestWearables = OnRequestWearables;
if (handlerRequestWearables != null)
{
m_log.DebugFormat("[APPEARANCE]: Wearables requested by {0}", Name);
handlerRequestWearables();
}
@ -4211,7 +4211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.AgentSetAppearance:
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
@ -4494,9 +4494,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Objects/m_sceneObjects
#region Objects/m_sceneObjects
case PacketType.ObjectLink:
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
@ -4789,10 +4789,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
case PacketType.ObjectName:
ObjectNamePacket objName = (ObjectNamePacket)Pack;
handlerObjectName = null;
for (int i = 0; i < objName.ObjectData.Length; i++)
{
{
handlerObjectName = OnObjectName;
if (handlerObjectName != null)
{
@ -4924,7 +4924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
handlerObjectClickAction = OnObjectClickAction;
if (handlerObjectClickAction != null)
if (handlerObjectClickAction != null)
{
foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData)
{
@ -4950,9 +4950,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Inventory/Asset/Other related packets
#region Inventory/Asset/Other related packets
case PacketType.RequestImage:
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
@ -5009,7 +5009,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (ti.OwnerID != AgentId)
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;
if (ti.AssetID != requestID)
@ -5021,12 +5021,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (userInfo == null)
{
m_log.ErrorFormat(
"[CLIENT]: Could not resolve user {0} for caps inventory update",
"[CLIENT]: Could not resolve user {0} for caps inventory update",
AgentId);
break;
}
if (userInfo.RootFolder == null)
break;
@ -5565,7 +5565,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
case PacketType.UUIDNameRequest:
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@ -5579,7 +5579,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#region Parcel related packets
#region Parcel related packets
case PacketType.RegionHandleRequest:
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
@ -5774,9 +5774,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Estate Packets
#region Estate Packets
case PacketType.EstateOwnerMessage:
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
@ -5802,21 +5802,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
// case "texturebase":
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
// {
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
// {
// string s = Utils.BytesToString(block.Parameter);
// string[] splitField = s.Split(' ');
// if (splitField.Length == 2)
// {
// UUID tempUUID = new UUID(splitField[1]);
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
// }
// }
// }
// break;
// case "texturebase":
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
// {
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
// {
// string s = Utils.BytesToString(block.Parameter);
// string[] splitField = s.Split(' ');
// if (splitField.Length == 2)
// {
// UUID tempUUID = new UUID(splitField[1]);
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
// }
// }
// }
// break;
case "texturedetail":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{
@ -6066,9 +6066,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region GodPackets
#region GodPackets
case PacketType.RequestGodlikePowers:
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
@ -6114,9 +6114,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//OutPacket(kupack, ThrottleOutPacketType.Task);
break;
#endregion
#endregion
#region Economy/Transaction Packets
#region Economy/Transaction Packets
case PacketType.MoneyBalanceRequest:
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
@ -6187,9 +6187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Script Packets
#region Script Packets
case PacketType.GetScriptRunning:
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
@ -6218,9 +6218,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Gesture Managment
#region Gesture Managment
case PacketType.ActivateGestures:
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
@ -6258,10 +6258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region unimplemented handlers
#region unimplemented handlers
case PacketType.StartPingCheck:
// Send the client the ping response back
@ -6279,10 +6279,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
break;
//case PacketType.GenericMessage:
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
//break;
//case PacketType.GenericMessage:
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
//break;
case PacketType.MapItemRequest:
// TODO: handle this packet
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
@ -6290,8 +6290,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerMapItemRequest = OnMapItemRequest;
if (handlerMapItemRequest != null)
{
handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
mirpk.AgentData.Godlike,mirpk.RequestData.ItemType,
handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
mirpk.RequestData.RegionHandle);
}
@ -6406,7 +6406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID);
}
break;
case PacketType.ParcelSetOtherCleanTime:
ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack;
handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime;
@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
break;
#endregion
#endregion
}
PacketPool.Instance.ReturnPacket(Pack);
@ -7209,7 +7209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
commandMessagePacket.CommandBlock.Flags = flags;
commandMessagePacket.CommandBlock.Command =(uint) command;
commandMessagePacket.CommandBlock.Command = (uint)command;
commandMessagePacket.CommandBlock.Time = time;
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
@ -7238,7 +7238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#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);
packet.ObjectData.ObjectID = objectID;
@ -7256,7 +7256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
public void SendClearFollowCamProperties (UUID objectID)
public void SendClearFollowCamProperties(UUID objectID)
{
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
packet.ObjectData.ObjectID = objectID;
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion
public void SendRegionHandle(UUID regionID, ulong handle) {
public void SendRegionHandle(UUID regionID, ulong handle)
{
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
reply.ReplyBlock.RegionID = regionID;
reply.ReplyBlock.RegionHandle = handle;
@ -7321,14 +7322,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
switch (option)
{
case "ReliableIsImportant":
bool val;
case "ReliableIsImportant":
bool val;
if (bool.TryParse(value, out val))
m_PacketHandler.ReliableIsImportant = val;
break;
default:
break;
if (bool.TryParse(value, out val))
m_PacketHandler.ReliableIsImportant = val;
break;
default:
break;
}
}
@ -7338,7 +7339,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
case "ReliableIsImportant":
return m_PacketHandler.ReliableIsImportant.ToString();
default:
break;
}
@ -7586,7 +7587,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
mirplk.AgentData.AgentID = AgentId;
mirplk.RequestData.ItemType = mapitemtype;
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();
mrdata.X = replies[i].x;
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
KillPacket kp = new KillPacket();
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
}
public string Report()
{
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
return handler.PacketQueue.GetStats();
}
}
}

View File

@ -576,7 +576,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// See IPullStatsProvider
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(),
IncomingPacketQueue.Count,
OutgoingPacketQueue.Count,

View File

@ -4047,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
}
internal void ForEachClient(Action<IClientAPI> action)
public void ForEachClient(Action<IClientAPI> action)
{
m_innerScene.ForEachClient(action);
}

View File

@ -2589,6 +2589,7 @@
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.Environment"/>
<Reference name="OpenSim.Region.ClientStack"/>