Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2011-01-23 23:29:25 +00:00
commit 105deab601
32 changed files with 576 additions and 480 deletions

View File

@ -1,136 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Reflection;
using System.Text;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Region.ClientStack;
using OpenSim.Region.ClientStack.LindenUDP;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Client.Linden
{
/// <summary>
/// Linden UDP Stack Region Module
/// </summary>
public class LLClientStackModule : INonSharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
#region IRegionModule Members
/// <summary>
/// Scene that contains the region's data
/// </summary>
protected Scene m_scene;
protected bool m_createClientStack = false;
protected IClientNetworkServer m_clientServer;
protected ClientStackManager m_clientStackManager;
protected IConfigSource m_source;
protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll";
public void Initialise(IConfigSource source)
{
if (m_scene == null)
{
m_source = source;
IConfig startupConfig = m_source.Configs["Startup"];
if (startupConfig != null)
{
m_clientStackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
}
}
}
public void AddRegion(Scene scene)
{
}
public void RemoveRegion(Scene scene)
{
}
public void RegionLoaded(Scene scene)
{
if (m_scene == null)
{
m_scene = scene;
}
if ((m_scene != null) && (m_createClientStack))
{
m_log.Info("[LLClientStackModule] Starting up LLClientStack.");
IPEndPoint endPoint = m_scene.RegionInfo.InternalEndPoint;
uint port = (uint)endPoint.Port;
m_clientStackManager = new ClientStackManager(m_clientStackDll);
m_clientServer
= m_clientStackManager.CreateServer(endPoint.Address,
ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source,
m_scene.AuthenticateHandler);
m_clientServer.AddScene(m_scene);
m_clientServer.Start();
}
}
public void Close()
{
}
public Type ReplaceableInterface
{
get { return null; }
}
public string Name
{
get { return "LLClientStackModule"; }
}
public bool IsSharedModule
{
get { return false; }
}
#endregion
}
}

View File

@ -1,13 +0,0 @@
<Addin id="OpenSim.Client.Linden.LindenModules" version="0.2">
<Runtime>
<Import assembly="OpenSim.Client.Linden.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/RegionModules">
<RegionModule id="LLClientStackModule" type="OpenSim.Client.Linden.LLClientStackModule" />
</Extension>
</Addin>

View File

@ -765,8 +765,8 @@ namespace OpenSim.Framework.Capabilities
{ {
try try
{ {
m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + // m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
m_regionName); // m_regionName);
string capsBase = "/CAPS/" + m_capsObjectPath; string capsBase = "/CAPS/" + m_capsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
@ -1332,7 +1332,7 @@ namespace OpenSim.Framework.Capabilities
newAssetID = UUID.Random(); newAssetID = UUID.Random();
uploaderPath = path; uploaderPath = path;
httpListener = httpServer; httpListener = httpServer;
m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); // m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
} }
/// <summary> /// <summary>
@ -1360,7 +1360,7 @@ namespace OpenSim.Framework.Capabilities
httpListener.RemoveStreamHandler("POST", uploaderPath); httpListener.RemoveStreamHandler("POST", uploaderPath);
m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); // m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
return res; return res;
} }

View File

@ -76,6 +76,11 @@ namespace OpenSim.Framework.Console
System.Console.WriteLine(text); System.Console.WriteLine(text);
} }
public virtual void OutputFormat(string format, params string[] components)
{
Output(string.Format(format, components));
}
public string CmdPrompt(string p) public string CmdPrompt(string p)
{ {
return ReadLine(String.Format("{0}: ", p), false, true); return ReadLine(String.Format("{0}: ", p), false, true);

View File

@ -175,7 +175,7 @@ namespace OpenSim.Framework.Servers
m_console.Commands.AddCommand("base", false, "show info", m_console.Commands.AddCommand("base", false, "show info",
"show info", "show info",
"Show general information", HandleShow); "Show general information about the server", HandleShow);
m_console.Commands.AddCommand("base", false, "show stats", m_console.Commands.AddCommand("base", false, "show stats",
"show stats", "show stats",
@ -371,8 +371,7 @@ namespace OpenSim.Framework.Servers
switch (showParams[0]) switch (showParams[0])
{ {
case "info": case "info":
Notice("Version: " + m_version); ShowInfo();
Notice("Startup directory: " + m_startupDirectory);
break; break;
case "stats": case "stats":
@ -389,24 +388,49 @@ namespace OpenSim.Framework.Servers
break; break;
case "version": case "version":
Notice( Notice(GetVersionText());
String.Format(
"Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion));
break; break;
} }
} }
protected void ShowInfo()
{
Notice(GetVersionText());
Notice("Startup directory: " + m_startupDirectory);
if (null != m_consoleAppender)
Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold));
}
protected string GetVersionText()
{
return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
}
/// <summary>
/// Console output is only possible if a console has been established.
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
/// </summary>
/// <param name="msg"></param>
protected void Notice(string msg)
{
if (m_console != null)
{
m_console.Output(msg);
}
}
/// <summary> /// <summary>
/// Console output is only possible if a console has been established. /// Console output is only possible if a console has been established.
/// 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>
protected void Notice(string msg) /// <param name="format"></param>
/// <param name="components"></param>
protected void Notice(string format, params string[] components)
{ {
if (m_console != null) if (m_console != null)
{ m_console.OutputFormat(format, components);
m_console.Output(msg);
}
} }
/// <summary> /// <summary>

View File

@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer
// Every month or so this will wrap and give bad numbers, not really a problem // Every month or so this will wrap and give bad numbers, not really a problem
// since its just for reporting, 200ms limit can be adjusted // since its just for reporting, 200ms limit can be adjusted
int tickdiff = Environment.TickCount - tickstart; int tickdiff = Environment.TickCount - tickstart;
if (tickdiff > 200) if (tickdiff > 500)
m_log.InfoFormat("[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms",reqnum,request.RawUrl,tickdiff); m_log.InfoFormat(
"[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff);
} }
} }

View File

@ -58,7 +58,7 @@ namespace OpenSim.Framework
// number of milliseconds a call can take before it is considered // number of milliseconds a call can take before it is considered
// a "long" call for warning & debugging purposes // a "long" call for warning & debugging purposes
public const int LongCallTime = 200; public const int LongCallTime = 500;
/// <summary> /// <summary>
/// Send LLSD to an HTTP client in application/llsd+json form /// Send LLSD to an HTTP client in application/llsd+json form

View File

@ -283,10 +283,6 @@ namespace OpenSim
"kick user <first> <last> [message]", "kick user <first> <last> [message]",
"Kick a user off the simulator", KickUserCommand); "Kick a user off the simulator", KickUserCommand);
m_console.Commands.AddCommand("region", false, "show assets",
"show assets",
"Show asset data", HandleShow);
m_console.Commands.AddCommand("region", false, "show users", m_console.Commands.AddCommand("region", false, "show users",
"show users [full]", "show users [full]",
"Show user data for users currently on the region", "Show user data for users currently on the region",
@ -306,13 +302,6 @@ namespace OpenSim
"show regions", "show regions",
"Show region data", HandleShow); "Show region data", HandleShow);
m_console.Commands.AddCommand("region", false, "show queues",
"show queues [full]",
"Show queue data for each client",
"Without the 'full' option, only users actually on the region are shown."
+ " With the 'full' option child agents of users in neighbouring regions are also shown.",
HandleShow);
m_console.Commands.AddCommand("region", false, "show ratings", m_console.Commands.AddCommand("region", false, "show ratings",
"show ratings", "show ratings",
"Show rating data", HandleShow); "Show rating data", HandleShow);
@ -335,16 +324,19 @@ namespace OpenSim
"Restart all sims in this instance", RunCommand); "Restart all sims in this instance", RunCommand);
m_console.Commands.AddCommand("region", false, "config set", m_console.Commands.AddCommand("region", false, "config set",
"config set <section> <field> <value>", "config set <section> <key> <value>",
"Set a config option", HandleConfig); "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig);
m_console.Commands.AddCommand("region", false, "config get", m_console.Commands.AddCommand("region", false, "config get",
"config get <section> <field>", "config get [<section>] [<key>]",
"Read a config option", HandleConfig); "Show a config option",
"If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine
+ "If a section is given but not a field, then all fields in that section are printed.",
HandleConfig);
m_console.Commands.AddCommand("region", false, "config save", m_console.Commands.AddCommand("region", false, "config save",
"config save", "config save <path>",
"Save current configuration", HandleConfig); "Save current configuration to a file at the given path", HandleConfig);
m_console.Commands.AddCommand("region", false, "command-script", m_console.Commands.AddCommand("region", false, "command-script",
"command-script <script>", "command-script <script>",
@ -586,7 +578,6 @@ namespace OpenSim
List<string> args = new List<string>(cmd); List<string> args = new List<string>(cmd);
args.RemoveAt(0); args.RemoveAt(0);
string[] cmdparams = args.ToArray(); string[] cmdparams = args.ToArray();
string n = "CONFIG";
if (cmdparams.Length > 0) if (cmdparams.Length > 0)
{ {
@ -595,8 +586,8 @@ namespace OpenSim
case "set": case "set":
if (cmdparams.Length < 4) if (cmdparams.Length < 4)
{ {
MainConsole.Instance.Output(String.Format("SYNTAX: {0} SET SECTION KEY VALUE",n)); Notice("Syntax: config set <section> <key> <value>");
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5",n)); Notice("Example: config set ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
} }
else else
{ {
@ -609,48 +600,68 @@ namespace OpenSim
c.Set(cmdparams[2], _value); c.Set(cmdparams[2], _value);
m_config.Source.Merge(source); m_config.Source.Merge(source);
MainConsole.Instance.Output(String.Format("{0} {0} {1} {2} {3}",n,cmdparams[1],cmdparams[2],_value)); Notice("In section [{0}], set {1} = {2}", c.Name, cmdparams[2], _value);
} }
} }
break; break;
case "get": case "get":
if (cmdparams.Length < 3) if (cmdparams.Length == 1)
{ {
MainConsole.Instance.Output(String.Format("SYNTAX: {0} GET SECTION KEY",n)); foreach (IConfig config in m_config.Source.Configs)
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} GET ScriptEngine.DotNetEngine NumberOfScriptThreads",n));
}
else
{
IConfig c = m_config.Source.Configs[cmdparams[1]];
if (c == null)
{ {
MainConsole.Instance.Output(String.Format("Section \"{0}\" does not exist.",cmdparams[1])); Notice("[{0}]", config.Name);
string[] keys = config.GetKeys();
foreach (string key in keys)
Notice(" {0} = {1}", key, config.GetString(key));
}
}
else if (cmdparams.Length == 2 || cmdparams.Length == 3)
{
IConfig config = m_config.Source.Configs[cmdparams[1]];
if (config == null)
{
Notice("Section \"{0}\" does not exist.",cmdparams[1]);
break; break;
} }
else else
{ {
MainConsole.Instance.Output(String.Format("{0} GET {1} {2} : {3}",n,cmdparams[1],cmdparams[2], if (cmdparams.Length == 2)
c.GetString(cmdparams[2]))); {
Notice("[{0}]", config.Name);
foreach (string key in config.GetKeys())
Notice(" {0} = {1}", key, config.GetString(key));
}
else
{
Notice(
"config get {0} {1} : {2}",
cmdparams[1], cmdparams[2], config.GetString(cmdparams[2]));
}
} }
} }
else
{
Notice("Syntax: config get [<section>] [<key>]");
Notice("Example: config get ScriptEngine.DotNetEngine NumberOfScriptThreads");
}
break; break;
case "save": case "save":
if (cmdparams.Length < 2) if (cmdparams.Length < 2)
{ {
MainConsole.Instance.Output("SYNTAX: " + n + " SAVE FILE"); Notice("Syntax: config save <path>");
return; return;
} }
if (Application.iniFilePath == cmdparams[1]) if (Application.iniFilePath == cmdparams[1])
{ {
MainConsole.Instance.Output("FILE can not be " + Application.iniFilePath); Notice("Path can not be " + Application.iniFilePath);
return; return;
} }
MainConsole.Instance.Output("Saving configuration file: " + cmdparams[1]); Notice("Saving configuration file: " + cmdparams[1]);
m_config.Save(cmdparams[1]); m_config.Save(cmdparams[1]);
break; break;
} }
@ -869,10 +880,6 @@ namespace OpenSim
switch (showParams[0]) switch (showParams[0])
{ {
case "assets":
MainConsole.Instance.Output("Not implemented.");
break;
case "users": case "users":
IList agents; IList agents;
if (showParams.Length > 1 && showParams[1] == "full") if (showParams.Length > 1 && showParams[1] == "full")
@ -959,10 +966,6 @@ namespace OpenSim
}); });
break; break;
case "queues":
Notice(GetQueuesReport(showParams));
break;
case "ratings": case "ratings":
m_sceneManager.ForEachScene( m_sceneManager.ForEachScene(
delegate(Scene scene) delegate(Scene scene)
@ -989,94 +992,6 @@ namespace OpenSim
} }
} }
/// <summary>
/// Generate UDP Queue data report for each client
/// </summary>
/// <param name="showParams"></param>
/// <returns></returns>
private string GetQueuesReport(string[] showParams)
{
bool showChildren = false;
if (showParams.Length > 1 && showParams[1] == "full")
showChildren = true;
StringBuilder report = new StringBuilder();
int columnPadding = 2;
int maxNameLength = 18;
int maxRegionNameLength = 14;
int maxTypeLength = 4;
int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", "");
report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", "");
report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", "");
report.AppendFormat(
"{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
"Packets",
"Packets",
"Bytes",
"Bytes",
"Bytes",
"Bytes",
"Bytes",
"Bytes",
"Bytes",
"Bytes",
"Bytes");
report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
report.AppendFormat(
"{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
"Out",
"In",
"Unacked",
"Resend",
"Land",
"Wind",
"Cloud",
"Task",
"Texture",
"Asset",
"State");
m_sceneManager.ForEachScene(
delegate(Scene scene)
{
scene.ForEachClient(
delegate(IClientAPI client)
{
if (client is IStatsCollector)
{
bool isChild = scene.PresenceChildStatus(client.AgentId);
if (isChild && !showChildren)
return;
string name = client.Name;
string regionName = scene.RegionInfo.RegionName;
report.AppendFormat(
"{0,-" + maxNameLength + "}{1,-" + columnPadding + "}",
name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, "");
report.AppendFormat(
"{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}",
regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, "");
report.AppendFormat(
"{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}",
isChild ? "Cd" : "Rt", "");
IStatsCollector stats = (IStatsCollector)client;
report.AppendLine(stats.Report());
}
});
});
return report.ToString();
}
/// <summary> /// <summary>
/// Use XML2 format to serialize data to a file /// Use XML2 format to serialize data to a file
/// </summary> /// </summary>

View File

@ -370,6 +370,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Properties #region Properties
public LLUDPClient UDPClient { get { return m_udpClient; } } public LLUDPClient UDPClient { get { return m_udpClient; } }
public LLUDPServer UDPServer { get { return m_udpServer; } }
public IPEndPoint RemoteEndPoint { get { return m_udpClient.RemoteEndPoint; } } public IPEndPoint RemoteEndPoint { get { return m_udpClient.RemoteEndPoint; } }
public UUID SecureSessionId { get { return m_secureSessionId; } } public UUID SecureSessionId { get { return m_secureSessionId; } }
public IScene Scene { get { return m_scene; } } public IScene Scene { get { return m_scene; } }

View File

@ -257,18 +257,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string GetStats() public string GetStats()
{ {
return string.Format( return string.Format(
"{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}", "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}",
PacketsSent, PacketsSent,
PacketsReceived, PacketsReceived,
UnackedBytes, UnackedBytes,
m_throttleCategories[(int)ThrottleOutPacketType.Resend].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Land].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Wind].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Wind].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Cloud].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Cloud].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Task].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Task].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Texture].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Texture].Count,
m_throttleCategories[(int)ThrottleOutPacketType.Asset].Content, m_packetOutboxes[(int)ThrottleOutPacketType.Asset].Count,
m_throttleCategories[(int)ThrottleOutPacketType.State].Content); m_packetOutboxes[(int)ThrottleOutPacketType.State].Count);
} }
public void SendPacketStats() public void SendPacketStats()

View File

@ -114,8 +114,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//private UDPClientCollection m_clients = new UDPClientCollection(); //private UDPClientCollection m_clients = new UDPClientCollection();
/// <summary>Bandwidth throttle for this UDP server</summary> /// <summary>Bandwidth throttle for this UDP server</summary>
protected TokenBucket m_throttle; protected TokenBucket m_throttle;
/// <summary>Bandwidth throttle rates for this UDP server</summary> /// <summary>Bandwidth throttle rates for this UDP server</summary>
protected ThrottleRates m_throttleRates; public ThrottleRates ThrottleRates { get; private set; }
/// <summary>Manages authentication for agent circuits</summary> /// <summary>Manages authentication for agent circuits</summary>
private AgentCircuitManager m_circuitManager; private AgentCircuitManager m_circuitManager;
/// <summary>Reference to the scene this UDP server is attached to</summary> /// <summary>Reference to the scene this UDP server is attached to</summary>
@ -226,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion BinaryStats #endregion BinaryStats
m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps); m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps);
m_throttleRates = new ThrottleRates(configSource); ThrottleRates = new ThrottleRates(configSource);
} }
public void Start() public void Start()
@ -922,7 +924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo) protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
{ {
// Create the LLUDPClient // Create the LLUDPClient
LLUDPClient udpClient = new LLUDPClient(this, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
IClientAPI existingClient; IClientAPI existingClient;
if (!m_scene.TryGetClient(agentID, out existingClient)) if (!m_scene.TryGetClient(agentID, out existingClient))

View File

@ -41,8 +41,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
/// </summary> /// </summary>
public class AgentAssetTransactions public class AgentAssetTransactions
{ {
private static readonly ILog m_log = LogManager.GetLogger( // private static readonly ILog m_log = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); // MethodBase.GetCurrentMethod().DeclaringType);
// Fields // Fields
private bool m_dumpAssetsToFile; private bool m_dumpAssetsToFile;
@ -167,8 +167,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{ {
if (XferUploaders.ContainsKey(transactionID)) if (XferUploaders.ContainsKey(transactionID))
{ {
m_log.DebugFormat("[XFER]: Asked to update item {0} ({1})", // m_log.DebugFormat("[XFER]: Asked to update item {0} ({1})",
item.Name, item.ID); // item.Name, item.ID);
// Here we need to get the old asset to extract the // Here we need to get the old asset to extract the
// texture UUIDs if it's a wearable. // texture UUIDs if it's a wearable.
@ -195,8 +195,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
IInventoryService invService = m_Scene.InventoryService; IInventoryService invService = m_Scene.InventoryService;
invService.UpdateItem(item); invService.UpdateItem(item);
m_log.DebugFormat("[XFER]: Updated item {0} ({1}) with asset {2}", // m_log.DebugFormat("[XFER]: Updated item {0} ({1}) with asset {2}",
item.Name, item.ID, asset.FullID); // item.Name, item.ID, asset.FullID);
} }
} }
} }

View File

@ -49,8 +49,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class GetMeshModule : INonSharedRegionModule public class GetMeshModule : INonSharedRegionModule
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;
private IAssetService m_assetService; private IAssetService m_assetService;

View File

@ -50,8 +50,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;
private IAssetService m_assetService; private IAssetService m_assetService;
private bool m_dumpAssetsToFile = false; private bool m_dumpAssetsToFile = false;
@ -104,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
{ {
UUID capID = UUID.Random(); UUID capID = UUID.Random();
m_log.Info("[GETMESH]: /CAPS/" + capID); // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);
caps.RegisterHandler("NewFileAgentInventoryVariablePrice", caps.RegisterHandler("NewFileAgentInventoryVariablePrice",
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST",

View File

@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
} }
} }
m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId); m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId);
// If we only found default textures, then the appearance is not cached // If we only found default textures, then the appearance is not cached
return (defonly ? false : true); return (defonly ? false : true);
@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return; return;
} }
m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId); // m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}", client.AgentId);
// TODO: This is probably not necessary any longer, just assume the // TODO: This is probably not necessary any longer, just assume the
// textureEntry set implies that the appearance transaction is complete // textureEntry set implies that the appearance transaction is complete
@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{ {
changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; changed = sp.Appearance.SetTextureEntries(textureEntry) || changed;
m_log.InfoFormat("[AVFACTORY]: received texture update for {0}",client.AgentId); m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", client.AgentId);
Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); }); Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); });
// This appears to be set only in the final stage of the appearance // This appears to be set only in the final stage of the appearance

View File

@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
} }
} }
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
SendGridInstantMessageViaXMLRPC(im, result); SendGridInstantMessageViaXMLRPC(im, result);
return; return;

View File

@ -43,8 +43,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
{ {
public class ObjectAdd : IRegionModule public class ObjectAdd : IRegionModule
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;
#region IRegionModule Members #region IRegionModule Members

View File

@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
{ {
UUID capID = UUID.Random(); UUID capID = UUID.Random();
m_log.Info("[UploadObjectAssetModule]: /CAPS/" + capID); // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
caps.RegisterHandler("UploadObjectAsset", caps.RegisterHandler("UploadObjectAsset",
new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/", new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/",
delegate(Hashtable m_dhttpMethod) delegate(Hashtable m_dhttpMethod)
@ -156,7 +156,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error("[UploadObjectAssetModule]: Error deserializing message " + ex.ToString()); m_log.Error("[UPLOAD OBJECT ASSET MODULE]: Error deserializing message " + ex.ToString());
message = null; message = null;
} }
@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation); Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation);
Quaternion rot = Quaternion.Identity; Quaternion rot = Quaternion.Identity;
Vector3 rootpos = Vector3.Zero; Vector3 rootpos = Vector3.Zero;
Quaternion rootrot = Quaternion.Identity; // Quaternion rootrot = Quaternion.Identity;
SceneObjectGroup rootGroup = null; SceneObjectGroup rootGroup = null;
SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length]; SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length];
@ -186,11 +186,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
if (i == 0) if (i == 0)
{ {
rootpos = obj.Position; rootpos = obj.Position;
rootrot = obj.Rotation; // rootrot = obj.Rotation;
} }
// Combine the extraparams data into it's ugly blob again.... // Combine the extraparams data into it's ugly blob again....
//int bytelength = 0; //int bytelength = 0;
//for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++)
@ -363,9 +361,8 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>", ConvertUintToBytes(allparts[0].LocalId)); responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>", ConvertUintToBytes(allparts[0].LocalId));
return responsedata; return responsedata;
} }
private string ConvertUintToBytes(uint val) private string ConvertUintToBytes(uint val)
{ {
byte[] resultbytes = Utils.UIntToBytes(val); byte[] resultbytes = Utils.UIntToBytes(val);

View File

@ -781,6 +781,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; LookupUUIDS icon = (LookupUUIDS)iar.AsyncState;
icon.EndInvoke(iar); icon.EndInvoke(iar);
} }
private void LookupUUID(List<UUID> uuidLst) private void LookupUUID(List<UUID> uuidLst)
{ {
LookupUUIDS d = LookupUUIDsAsync; LookupUUIDS d = LookupUUIDsAsync;
@ -789,6 +790,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
LookupUUIDSCompleted, LookupUUIDSCompleted,
d); d);
} }
private void LookupUUIDsAsync(List<UUID> uuidLst) private void LookupUUIDsAsync(List<UUID> uuidLst)
{ {
UUID[] uuidarr; UUID[] uuidarr;
@ -803,12 +805,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
// string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>(); IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>();
string userName = "Unkown User";
if (userManager != null) if (userManager != null)
userName = userManager.GetUserName(uuidarr[i]); userManager.GetUserName(uuidarr[i]);
// we drop it. It gets cached though... so we're ready for the next request. // we drop it. It gets cached though... so we're ready for the next request.
// diva commnent 11/21/2010: uh?!? wft? // diva commnent 11/21/2010: uh?!? wft?
// justincc comment 21/01/2011: A side effect of userManager.GetUserName() I presume.
} }
} }
#endregion #endregion

View File

@ -217,6 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ParcelFlags.AllowDamage | ParcelFlags.AllowDamage |
ParcelFlags.CreateObjects | ParcelFlags.CreateObjects |
ParcelFlags.RestrictPushObject | ParcelFlags.RestrictPushObject |
ParcelFlags.AllowOtherScripts |
ParcelFlags.AllowGroupScripts | ParcelFlags.AllowGroupScripts |
ParcelFlags.CreateGroupObjects | ParcelFlags.CreateGroupObjects |
ParcelFlags.AllowAPrimitiveEntry | ParcelFlags.AllowAPrimitiveEntry |

View File

@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Commander m_commander = new Commander("export"); // private Commander m_commander = new Commander("export");
private List<Scene> m_regions = new List<Scene>(); private List<Scene> m_regions = new List<Scene>();
private string m_savedir = "exports"; private string m_savedir = "exports";
private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>(); private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>();
@ -77,14 +77,13 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
m_serialisers.Add(new SerialiseObjects()); m_serialisers.Add(new SerialiseObjects());
} }
LoadCommanderCommands(); // LoadCommanderCommands();
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
scene.RegisterModuleCommander(m_commander); // scene.RegisterModuleCommander(m_commander);
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; // scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
scene.RegisterModuleInterface<IRegionSerialiserModule>(this); scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
lock (m_regions) lock (m_regions)
@ -211,18 +210,18 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
#endregion #endregion
private void EventManager_OnPluginConsole(string[] args) // private void EventManager_OnPluginConsole(string[] args)
{ // {
if (args[0] == "export") // if (args[0] == "export")
{ // {
string[] tmpArgs = new string[args.Length - 2]; // string[] tmpArgs = new string[args.Length - 2];
int i = 0; // int i = 0;
for (i = 2; i < args.Length; i++) // for (i = 2; i < args.Length; i++)
tmpArgs[i - 2] = args[i]; // tmpArgs[i - 2] = args[i];
//
m_commander.ProcessConsoleCommand(args[1], tmpArgs); // m_commander.ProcessConsoleCommand(args[1], tmpArgs);
} // }
} // }
private void InterfaceSaveRegion(Object[] args) private void InterfaceSaveRegion(Object[] args)
{ {
@ -245,15 +244,15 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
} }
} }
private void LoadCommanderCommands() // private void LoadCommanderCommands()
{ // {
Command serialiseSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory."); // Command serialiseSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory.");
serialiseSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String"); // serialiseSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String");
//
Command serialiseAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory."); // Command serialiseAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory.");
//
m_commander.RegisterCommand("save", serialiseSceneCommand); // m_commander.RegisterCommand("save", serialiseSceneCommand);
m_commander.RegisterCommand("save-all", serialiseAllScenesCommand); // m_commander.RegisterCommand("save-all", serialiseAllScenesCommand);
} // }
} }
} }

View File

@ -38,7 +38,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
{ {
public class SoundModule : IRegionModule, ISoundModule public class SoundModule : IRegionModule, ISoundModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Scene m_scene; protected Scene m_scene;

View File

@ -85,9 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
public static float noise1(float arg) public static float noise1(float arg)
{ {
int bx0, bx1; int bx0, bx1;
float rx0, rx1, sx, t, u, v, a; float rx0, rx1, sx, t, u, v;
a = arg;
t = arg + N; t = arg + N;
bx0 = ((int)t) & BM; bx0 = ((int)t) & BM;

View File

@ -0,0 +1,348 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using log4net;
using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Statistics;
using OpenSim.Region.ClientStack.LindenUDP;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.UDP.Linden
{
/// <summary>
/// A module that just holds commands for inspecting the current state of the Linden UDP stack.
/// </summary>
/// <remarks>
/// All actual client stack functionality remains in OpenSim.Region.ClientStack.LindenUDP
/// </remarks>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")]
public class LindenUDPInfoModule : ISharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
public string Name { get { return "Linden UDP Module"; } }
public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source)
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE");
}
public void PostInitialise()
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE");
}
public void Close()
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE");
}
public void AddRegion(Scene scene)
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
lock (m_scenes)
m_scenes[scene.RegionInfo.RegionID] = scene;
scene.AddCommand(
this, "show queues",
"show queues [full]",
"Show queue data for each client",
"Without the 'full' option, only root agents are shown."
+ " With the 'full' option child agents are also shown.",
ShowQueuesReport);
scene.AddCommand(
this, "show throttles",
"show throttles [full]",
"Show throttle settings for each client and for the server overall",
"Without the 'full' option, only root agents are shown."
+ " With the 'full' option child agents are also shown.",
ShowThrottlesReport);
}
public void RemoveRegion(Scene scene)
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
lock (m_scenes)
m_scenes.Remove(scene.RegionInfo.RegionID);
}
public void RegionLoaded(Scene scene)
{
// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
}
protected void ShowQueuesReport(string module, string[] cmd)
{
MainConsole.Instance.Output(GetQueuesReport(cmd));
}
protected void ShowThrottlesReport(string module, string[] cmd)
{
MainConsole.Instance.Output(GetThrottlesReport(cmd));
}
protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
{
return string.Format(
"{0,-" + maxLength + "}{1,-" + columnPadding + "}",
entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
"");
}
/// <summary>
/// Generate UDP Queue data report for each client
/// </summary>
/// <param name="showParams"></param>
/// <returns></returns>
protected string GetQueuesReport(string[] showParams)
{
bool showChildren = false;
if (showParams.Length > 2 && showParams[2] == "full")
showChildren = true;
StringBuilder report = new StringBuilder();
int columnPadding = 2;
int maxNameLength = 18;
int maxRegionNameLength = 14;
int maxTypeLength = 4;
int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
report.AppendFormat(
"{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
"Pkts",
"Pkts",
"Bytes",
"Pkts",
"Pkts",
"Pkts",
"Pkts",
"Pkts",
"Pkts",
"Pkts",
"Pkts");
report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
report.AppendFormat(
"{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
"Out",
"In",
"Unacked",
"Resend",
"Land",
"Wind",
"Cloud",
"Task",
"Texture",
"Asset",
"State");
lock (m_scenes)
{
foreach (Scene scene in m_scenes.Values)
{
scene.ForEachClient(
delegate(IClientAPI client)
{
if (client is IStatsCollector)
{
bool isChild = scene.PresenceChildStatus(client.AgentId);
if (isChild && !showChildren)
return;
string name = client.Name;
string regionName = scene.RegionInfo.RegionName;
report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
IStatsCollector stats = (IStatsCollector)client;
report.AppendLine(stats.Report());
}
});
}
}
return report.ToString();
}
/// <summary>
/// Show throttle data
/// </summary>
/// <param name="showParams"></param>
/// <returns></returns>
protected string GetThrottlesReport(string[] showParams)
{
bool showChildren = false;
if (showParams.Length > 2 && showParams[2] == "full")
showChildren = true;
StringBuilder report = new StringBuilder();
int columnPadding = 2;
int maxNameLength = 18;
int maxRegionNameLength = 14;
int maxTypeLength = 4;
int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
"Total",
"Resend",
"Land",
"Wind",
"Cloud",
"Task",
"Texture",
"Asset");
report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
"kb/s",
"kb/s",
"kb/s",
"kb/s",
"kb/s",
"kb/s",
"kb/s",
"kb/s");
report.AppendLine();
bool firstClient = true;
lock (m_scenes)
{
foreach (Scene scene in m_scenes.Values)
{
scene.ForEachClient(
delegate(IClientAPI client)
{
if (client is LLClientView)
{
LLClientView llClient = client as LLClientView;
if (firstClient)
{
report.AppendLine(GetServerThrottlesReport(llClient.UDPServer));
firstClient = false;
}
bool isChild = scene.PresenceChildStatus(client.AgentId);
if (isChild && !showChildren)
return;
string name = client.Name;
string regionName = scene.RegionInfo.RegionName;
LLUDPClient llUdpClient = llClient.UDPClient;
ClientInfo ci = llUdpClient.GetClientInfo();
report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
(ci.totalThrottle * 8) / 1000,
(ci.resendThrottle * 8) / 1000,
(ci.landThrottle * 8) / 1000,
(ci.windThrottle * 8) / 1000,
(ci.cloudThrottle * 8) / 1000,
(ci.taskThrottle * 8) / 1000,
(ci.textureThrottle * 8) / 1000,
(ci.assetThrottle * 8) / 1000);
report.AppendLine();
}
});
}
}
return report.ToString();
}
protected string GetServerThrottlesReport(LLUDPServer udpServer)
{
StringBuilder report = new StringBuilder();
int columnPadding = 2;
int maxNameLength = 18;
int maxRegionNameLength = 14;
int maxTypeLength = 4;
string name = "SERVER AGENT LIMITS";
report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry("-", maxTypeLength, columnPadding));
ThrottleRates throttleRates = udpServer.ThrottleRates;
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
"n/a",
(throttleRates.ResendLimit * 8) / 1000,
(throttleRates.LandLimit * 8) / 1000,
(throttleRates.WindLimit * 8) / 1000,
(throttleRates.CloudLimit * 8) / 1000,
(throttleRates.TaskLimit * 8) / 1000,
(throttleRates.TextureLimit * 8) / 1000,
(throttleRates.AssetLimit * 8) / 1000);
return report.ToString();
}
}
}

View File

@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Grid
{ {
public class GridInfoServerInConnector : ServiceConnector public class GridInfoServerInConnector : ServiceConnector
{ {
private string m_ConfigName = "GridInfoService"; // private string m_ConfigName = "GridInfoService";
public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) : public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) :
base(config, server, configName) base(config, server, configName)

View File

@ -51,7 +51,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
{ {
public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IGatekeeperService m_GatekeeperService; private IGatekeeperService m_GatekeeperService;
public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy)

View File

@ -41,9 +41,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
{ {
public class GatekeeperServiceInConnector : ServiceConnector public class GatekeeperServiceInConnector : ServiceConnector
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger( // LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); // MethodBase.GetCurrentMethod().DeclaringType);
private IGatekeeperService m_GatekeeperService; private IGatekeeperService m_GatekeeperService;
public IGatekeeperService GateKeeper public IGatekeeperService GateKeeper

View File

@ -47,9 +47,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
{ {
public class UserAgentServerConnector : ServiceConnector public class UserAgentServerConnector : ServiceConnector
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger( // LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); // MethodBase.GetCurrentMethod().DeclaringType);
private IUserAgentService m_HomeUsersService; private IUserAgentService m_HomeUsersService;

View File

@ -347,7 +347,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleAddFolder(Dictionary<string,object> request) byte[] HandleAddFolder(Dictionary<string,object> request)
{ {
Dictionary<string,object> result = new Dictionary<string,object>();
InventoryFolderBase folder = BuildFolder(request); InventoryFolderBase folder = BuildFolder(request);
if (m_InventoryService.AddFolder(folder)) if (m_InventoryService.AddFolder(folder))
@ -358,7 +357,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleUpdateFolder(Dictionary<string,object> request) byte[] HandleUpdateFolder(Dictionary<string,object> request)
{ {
Dictionary<string, object> result = new Dictionary<string, object>();
InventoryFolderBase folder = BuildFolder(request); InventoryFolderBase folder = BuildFolder(request);
if (m_InventoryService.UpdateFolder(folder)) if (m_InventoryService.UpdateFolder(folder))
@ -369,7 +367,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleMoveFolder(Dictionary<string,object> request) byte[] HandleMoveFolder(Dictionary<string,object> request)
{ {
Dictionary<string, object> result = new Dictionary<string, object>();
UUID parentID = UUID.Zero; UUID parentID = UUID.Zero;
UUID.TryParse(request["ParentID"].ToString(), out parentID); UUID.TryParse(request["ParentID"].ToString(), out parentID);
UUID folderID = UUID.Zero; UUID folderID = UUID.Zero;
@ -387,7 +384,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleDeleteFolders(Dictionary<string,object> request) byte[] HandleDeleteFolders(Dictionary<string,object> request)
{ {
Dictionary<string,object> result = new Dictionary<string,object>();
UUID principal = UUID.Zero; UUID principal = UUID.Zero;
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
List<string> slist = (List<string>)request["FOLDERS"]; List<string> slist = (List<string>)request["FOLDERS"];
@ -408,8 +404,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandlePurgeFolder(Dictionary<string,object> request) byte[] HandlePurgeFolder(Dictionary<string,object> request)
{ {
Dictionary<string,object> result = new Dictionary<string,object>();
UUID folderID = UUID.Zero; UUID folderID = UUID.Zero;
UUID.TryParse(request["ID"].ToString(), out folderID); UUID.TryParse(request["ID"].ToString(), out folderID);
@ -422,7 +416,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleAddItem(Dictionary<string,object> request) byte[] HandleAddItem(Dictionary<string,object> request)
{ {
Dictionary<string, object> result = new Dictionary<string, object>();
InventoryItemBase item = BuildItem(request); InventoryItemBase item = BuildItem(request);
if (m_InventoryService.AddItem(item)) if (m_InventoryService.AddItem(item))
@ -433,7 +426,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleUpdateItem(Dictionary<string,object> request) byte[] HandleUpdateItem(Dictionary<string,object> request)
{ {
Dictionary<string, object> result = new Dictionary<string, object>();
InventoryItemBase item = BuildItem(request); InventoryItemBase item = BuildItem(request);
if (m_InventoryService.UpdateItem(item)) if (m_InventoryService.UpdateItem(item))
@ -444,7 +436,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleMoveItems(Dictionary<string,object> request) byte[] HandleMoveItems(Dictionary<string,object> request)
{ {
Dictionary<string,object> result = new Dictionary<string,object>();
List<string> idlist = (List<string>)request["IDLIST"]; List<string> idlist = (List<string>)request["IDLIST"];
List<string> destlist = (List<string>)request["DESTLIST"]; List<string> destlist = (List<string>)request["DESTLIST"];
UUID principal = UUID.Zero; UUID principal = UUID.Zero;
@ -483,7 +474,6 @@ namespace OpenSim.Server.Handlers.Asset
byte[] HandleDeleteItems(Dictionary<string,object> request) byte[] HandleDeleteItems(Dictionary<string,object> request)
{ {
Dictionary<string, object> result = new Dictionary<string, object>();
UUID principal = UUID.Zero; UUID principal = UUID.Zero;
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
List<string> slist = (List<string>)request["ITEMS"]; List<string> slist = (List<string>)request["ITEMS"];

View File

@ -129,8 +129,6 @@ namespace OpenSim.Server.Handlers.Presence
byte[] LogoutAgent(Dictionary<string, object> request) byte[] LogoutAgent(Dictionary<string, object> request)
{ {
UUID session = UUID.Zero; UUID session = UUID.Zero;
Vector3 position = Vector3.Zero;
Vector3 lookat = Vector3.Zero;
if (!request.ContainsKey("SessionID")) if (!request.ContainsKey("SessionID"))
return FailureResult(); return FailureResult();

View File

@ -38,7 +38,7 @@ namespace OpenSim.Server.Handlers.Simulation
public class SimulationServiceInConnector : ServiceConnector public class SimulationServiceInConnector : ServiceConnector
{ {
private ISimulationService m_LocalSimulationService; private ISimulationService m_LocalSimulationService;
private IAuthenticationService m_AuthenticationService; // private IAuthenticationService m_AuthenticationService;
public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
base(config, server, String.Empty) base(config, server, String.Empty)

View File

@ -1470,60 +1470,6 @@
</Files> </Files>
</Project> </Project>
<Project frameworkVersion="v3_5" name="OpenSim.Region.OptionalModules" path="OpenSim/Region/OptionalModules" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="System"/>
<Reference name="System.Xml"/>
<Reference name="System.Drawing"/>
<Reference name="System.Web"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="PumaCode.SvnDotNet" path="../../../bin/"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenSim.Region.CoreModules"/>
<Reference name="OpenSim.Framework.Capabilities"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Server.Base"/>
<Reference name="OpenSim.Server.Handlers"/>
<Reference name="OpenSim.Services.Connectors"/>
<Reference name="OpenSim.Services.Base"/>
<Reference name="OpenSim.Services.Interfaces"/>
<Reference name="Mono.Addins" path="../../../bin/"/>
<!-- For scripting in funny languages by default -->
<Reference name="XMLRPC" path="../../../bin/"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="Nini" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/>
<Reference name="DotNetOpenMail" path="../../../bin/"/>
<Files>
<Match pattern="*.cs" recurse="true">
<Exclude name="Tests" pattern="Tests"/>
</Match>
<Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/>
</Files>
</Project>
<Project frameworkVersion="v3_5" name="OpenSim.Region.RegionCombinerModule" path="OpenSim/Region/RegionCombinerModule" type="Library"> <Project frameworkVersion="v3_5" name="OpenSim.Region.RegionCombinerModule" path="OpenSim/Region/RegionCombinerModule" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
<Options> <Options>
@ -1587,7 +1533,6 @@
<Reference name="OpenSim.Framework.Communications"/> <Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Framework.Statistics"/> <Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.Physics.Manager"/> <Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Region.CoreModules"/>
<Reference name="XMLRPC" path="../../../bin/"/> <Reference name="XMLRPC" path="../../../bin/"/>
<Reference name="Nini" path="../../../bin/"/> <Reference name="Nini" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/> <Reference name="log4net" path="../../../bin/"/>
@ -1638,6 +1583,61 @@
</Files> </Files>
</Project> </Project>
<Project frameworkVersion="v3_5" name="OpenSim.Region.OptionalModules" path="OpenSim/Region/OptionalModules" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="System"/>
<Reference name="System.Xml"/>
<Reference name="System.Drawing"/>
<Reference name="System.Web"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="PumaCode.SvnDotNet" path="../../../bin/"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Framework.Capabilities"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.ClientStack.LindenUDP"/>
<Reference name="OpenSim.Region.CoreModules"/>
<Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Server.Base"/>
<Reference name="OpenSim.Server.Handlers"/>
<Reference name="OpenSim.Services.Connectors"/>
<Reference name="OpenSim.Services.Base"/>
<Reference name="OpenSim.Services.Interfaces"/>
<Reference name="Mono.Addins" path="../../../bin/"/>
<!-- For scripting in funny languages by default -->
<Reference name="XMLRPC" path="../../../bin/"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="Nini" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/>
<Reference name="DotNetOpenMail" path="../../../bin/"/>
<Files>
<Match pattern="*.cs" recurse="true">
<Exclude name="Tests" pattern="Tests"/>
</Match>
<Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/>
</Files>
</Project>
<!-- Datastore Plugins --> <!-- Datastore Plugins -->
<Project frameworkVersion="v3_5" name="OpenSim.Data.Null" path="OpenSim/Data/Null" type="Library"> <Project frameworkVersion="v3_5" name="OpenSim.Data.Null" path="OpenSim/Data/Null" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
@ -2022,7 +2022,6 @@
</Files> </Files>
</Project> </Project>
<Project frameworkVersion="v3_5" name="OpenSim.Client.VWoHTTP" path="OpenSim/Client/VWoHTTP" type="Library"> <Project frameworkVersion="v3_5" name="OpenSim.Client.VWoHTTP" path="OpenSim/Client/VWoHTTP" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
<Options> <Options>
@ -2054,45 +2053,6 @@
</Files> </Files>
</Project> </Project>
<Project frameworkVersion="v3_5" name="OpenSim.Client.Linden" path="OpenSim/Client/Linden" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="System"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="Nini" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/>
<Reference name="OpenSim.Framework.Capabilities"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
<Reference name="OpenSim.Region.ClientStack"/>
<Reference name="OpenSim.Region.ClientStack.LindenUDP"/>
<Reference name="OpenSim.Services.Interfaces"/>
<Reference name="XMLRPC" path="../../../bin/"/>
<Reference name="OpenSim.Region.Framework"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
<Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/>
</Files>
</Project>
<!-- Data Base Modules --> <!-- Data Base Modules -->
<Project frameworkVersion="v3_5" name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library"> <Project frameworkVersion="v3_5" name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">