Merge branch 'master' of /home/opensim/src/OpenSim/Core
commit
d89d9d1b13
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -867,7 +867,7 @@ namespace OpenSim.Data.MySQL
|
|||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand sqlCmd = new MySqlCommand(
|
||||
"SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", dbcon))
|
||||
"SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags & 1", dbcon))
|
||||
{
|
||||
sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString());
|
||||
sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture);
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace OpenSim.Data.MySQL
|
|||
{
|
||||
using (MySqlCommand cmd = new MySqlCommand())
|
||||
{
|
||||
cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags = 1", m_Realm);
|
||||
cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm);
|
||||
|
||||
cmd.Parameters.AddWithValue("?uuid", principalID.ToString());
|
||||
cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture);
|
||||
|
|
|
@ -427,17 +427,28 @@ namespace OpenSim.Framework
|
|||
/// 0x80 bit set then we assume this is an append
|
||||
/// operation otherwise we replace whatever is
|
||||
/// currently attached at the attachpoint
|
||||
/// return true if something actually changed
|
||||
/// </summary>
|
||||
public void SetAttachment(int attachpoint, UUID item, UUID asset)
|
||||
public bool SetAttachment(int attachpoint, UUID item, UUID asset)
|
||||
{
|
||||
if (attachpoint == 0)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (item == UUID.Zero)
|
||||
{
|
||||
if (m_attachments.ContainsKey(attachpoint))
|
||||
{
|
||||
m_attachments.Remove(attachpoint);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if the item is already attached at this point
|
||||
if (GetAttachpoint(item) == (attachpoint & 0x7F))
|
||||
{
|
||||
// m_log.DebugFormat("[AVATAR APPEARANCE] attempt to attach an already attached item {0}",item);
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if this is an append or a replace, 0x80 marks it as an append
|
||||
|
@ -451,6 +462,7 @@ namespace OpenSim.Framework
|
|||
{
|
||||
ReplaceAttachment(new AvatarAttachment(attachpoint,item,asset));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int GetAttachpoint(UUID itemID)
|
||||
|
@ -465,7 +477,7 @@ namespace OpenSim.Framework
|
|||
return 0;
|
||||
}
|
||||
|
||||
public void DetachAttachment(UUID itemID)
|
||||
public bool DetachAttachment(UUID itemID)
|
||||
{
|
||||
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
|
||||
{
|
||||
|
@ -478,9 +490,10 @@ namespace OpenSim.Framework
|
|||
// And remove the list if there are no more attachments here
|
||||
if (m_attachments[kvp.Key].Count == 0)
|
||||
m_attachments.Remove(kvp.Key);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ClearAttachments()
|
||||
|
|
|
@ -765,8 +765,8 @@ namespace OpenSim.Framework.Capabilities
|
|||
{
|
||||
try
|
||||
{
|
||||
m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
|
||||
m_regionName);
|
||||
// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
|
||||
// m_regionName);
|
||||
|
||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||
|
@ -1332,7 +1332,7 @@ namespace OpenSim.Framework.Capabilities
|
|||
newAssetID = UUID.Random();
|
||||
uploaderPath = path;
|
||||
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>
|
||||
|
@ -1360,7 +1360,7 @@ namespace OpenSim.Framework.Capabilities
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -76,6 +76,11 @@ namespace OpenSim.Framework.Console
|
|||
System.Console.WriteLine(text);
|
||||
}
|
||||
|
||||
public virtual void OutputFormat(string format, params object[] components)
|
||||
{
|
||||
Output(string.Format(format, components));
|
||||
}
|
||||
|
||||
public string CmdPrompt(string p)
|
||||
{
|
||||
return ReadLine(String.Format("{0}: ", p), false, true);
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
m_console.Commands.AddCommand("base", false, "show info",
|
||||
"show info",
|
||||
"Show general information", HandleShow);
|
||||
"Show general information about the server", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("base", false, "show stats",
|
||||
"show stats",
|
||||
|
@ -371,8 +371,7 @@ namespace OpenSim.Framework.Servers
|
|||
switch (showParams[0])
|
||||
{
|
||||
case "info":
|
||||
Notice("Version: " + m_version);
|
||||
Notice("Startup directory: " + m_startupDirectory);
|
||||
ShowInfo();
|
||||
break;
|
||||
|
||||
case "stats":
|
||||
|
@ -389,24 +388,49 @@ namespace OpenSim.Framework.Servers
|
|||
break;
|
||||
|
||||
case "version":
|
||||
Notice(
|
||||
String.Format(
|
||||
"Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion));
|
||||
Notice(GetVersionText());
|
||||
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>
|
||||
/// 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>
|
||||
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)
|
||||
{
|
||||
m_console.Output(msg);
|
||||
}
|
||||
m_console.OutputFormat(format, components);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
// 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
|
||||
int tickdiff = Environment.TickCount - tickstart;
|
||||
if (tickdiff > 200)
|
||||
m_log.InfoFormat("[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms",reqnum,request.RawUrl,tickdiff);
|
||||
if (tickdiff > 500)
|
||||
m_log.InfoFormat(
|
||||
"[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenSim.Framework
|
|||
|
||||
// number of milliseconds a call can take before it is considered
|
||||
// a "long" call for warning & debugging purposes
|
||||
public const int LongCallTime = 200;
|
||||
public const int LongCallTime = 500;
|
||||
|
||||
/// <summary>
|
||||
/// Send LLSD to an HTTP client in application/llsd+json form
|
||||
|
|
|
@ -283,10 +283,6 @@ namespace OpenSim
|
|||
"kick user <first> <last> [message]",
|
||||
"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",
|
||||
"show users [full]",
|
||||
"Show user data for users currently on the region",
|
||||
|
@ -306,13 +302,6 @@ namespace OpenSim
|
|||
"show regions",
|
||||
"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",
|
||||
"show ratings",
|
||||
"Show rating data", HandleShow);
|
||||
|
@ -335,16 +324,19 @@ namespace OpenSim
|
|||
"Restart all sims in this instance", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "config set",
|
||||
"config set <section> <field> <value>",
|
||||
"Set a config option", HandleConfig);
|
||||
"config set <section> <key> <value>",
|
||||
"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",
|
||||
"config get <section> <field>",
|
||||
"Read a config option", HandleConfig);
|
||||
"config get [<section>] [<key>]",
|
||||
"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",
|
||||
"config save",
|
||||
"Save current configuration", HandleConfig);
|
||||
"config save <path>",
|
||||
"Save current configuration to a file at the given path", HandleConfig);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "command-script",
|
||||
"command-script <script>",
|
||||
|
@ -586,7 +578,6 @@ namespace OpenSim
|
|||
List<string> args = new List<string>(cmd);
|
||||
args.RemoveAt(0);
|
||||
string[] cmdparams = args.ToArray();
|
||||
string n = "CONFIG";
|
||||
|
||||
if (cmdparams.Length > 0)
|
||||
{
|
||||
|
@ -595,8 +586,8 @@ namespace OpenSim
|
|||
case "set":
|
||||
if (cmdparams.Length < 4)
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("SYNTAX: {0} SET SECTION KEY VALUE",n));
|
||||
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5",n));
|
||||
Notice("Syntax: config set <section> <key> <value>");
|
||||
Notice("Example: config set ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -609,30 +600,50 @@ namespace OpenSim
|
|||
c.Set(cmdparams[2], _value);
|
||||
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;
|
||||
|
||||
case "get":
|
||||
if (cmdparams.Length < 3)
|
||||
if (cmdparams.Length == 1)
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("SYNTAX: {0} GET SECTION KEY",n));
|
||||
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} GET ScriptEngine.DotNetEngine NumberOfScriptThreads",n));
|
||||
foreach (IConfig config in m_config.Source.Configs)
|
||||
{
|
||||
Notice("[{0}]", config.Name);
|
||||
string[] keys = config.GetKeys();
|
||||
foreach (string key in keys)
|
||||
Notice(" {0} = {1}", key, config.GetString(key));
|
||||
}
|
||||
else
|
||||
}
|
||||
else if (cmdparams.Length == 2 || cmdparams.Length == 3)
|
||||
{
|
||||
IConfig c = m_config.Source.Configs[cmdparams[1]];
|
||||
if (c == null)
|
||||
IConfig config = m_config.Source.Configs[cmdparams[1]];
|
||||
if (config == null)
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("Section \"{0}\" does not exist.",cmdparams[1]));
|
||||
Notice("Section \"{0}\" does not exist.",cmdparams[1]);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("{0} GET {1} {2} : {3}",n,cmdparams[1],cmdparams[2],
|
||||
c.GetString(cmdparams[2])));
|
||||
if (cmdparams.Length == 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;
|
||||
|
@ -640,17 +651,17 @@ namespace OpenSim
|
|||
case "save":
|
||||
if (cmdparams.Length < 2)
|
||||
{
|
||||
MainConsole.Instance.Output("SYNTAX: " + n + " SAVE FILE");
|
||||
Notice("Syntax: config save <path>");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.iniFilePath == cmdparams[1])
|
||||
{
|
||||
MainConsole.Instance.Output("FILE can not be " + Application.iniFilePath);
|
||||
Notice("Path can not be " + Application.iniFilePath);
|
||||
return;
|
||||
}
|
||||
|
||||
MainConsole.Instance.Output("Saving configuration file: " + cmdparams[1]);
|
||||
Notice("Saving configuration file: " + cmdparams[1]);
|
||||
m_config.Save(cmdparams[1]);
|
||||
break;
|
||||
}
|
||||
|
@ -869,10 +880,6 @@ namespace OpenSim
|
|||
|
||||
switch (showParams[0])
|
||||
{
|
||||
case "assets":
|
||||
MainConsole.Instance.Output("Not implemented.");
|
||||
break;
|
||||
|
||||
case "users":
|
||||
IList agents;
|
||||
if (showParams.Length > 1 && showParams[1] == "full")
|
||||
|
@ -959,10 +966,6 @@ namespace OpenSim
|
|||
});
|
||||
break;
|
||||
|
||||
case "queues":
|
||||
Notice(GetQueuesReport(showParams));
|
||||
break;
|
||||
|
||||
case "ratings":
|
||||
m_sceneManager.ForEachScene(
|
||||
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>
|
||||
/// Use XML2 format to serialize data to a file
|
||||
/// </summary>
|
||||
|
|
|
@ -368,6 +368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
#region Properties
|
||||
|
||||
public LLUDPClient UDPClient { get { return m_udpClient; } }
|
||||
public LLUDPServer UDPServer { get { return m_udpServer; } }
|
||||
public IPEndPoint RemoteEndPoint { get { return m_udpClient.RemoteEndPoint; } }
|
||||
public UUID SecureSessionId { get { return m_secureSessionId; } }
|
||||
public IScene Scene { get { return m_scene; } }
|
||||
|
@ -3465,9 +3466,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
ani.AnimationList[i].AnimSequenceID = seqs[i];
|
||||
|
||||
ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock();
|
||||
if (objectIDs[i].Equals(sourceAgentId))
|
||||
ani.AnimationSourceList[i].ObjectID = UUID.Zero;
|
||||
else
|
||||
ani.AnimationSourceList[i].ObjectID = objectIDs[i];
|
||||
if (objectIDs[i] == UUID.Zero)
|
||||
ani.AnimationSourceList[i].ObjectID = sourceAgentId;
|
||||
}
|
||||
ani.Header.Reliable = false;
|
||||
OutPacket(ani, ThrottleOutPacketType.Task);
|
||||
|
|
|
@ -256,18 +256,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public string GetStats()
|
||||
{
|
||||
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,
|
||||
PacketsReceived,
|
||||
UnackedBytes,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Resend].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Land].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Wind].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Cloud].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Task].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Texture].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.Asset].Content,
|
||||
m_throttleCategories[(int)ThrottleOutPacketType.State].Content);
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Wind].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Cloud].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Task].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Texture].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Asset].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.State].Count);
|
||||
}
|
||||
|
||||
public void SendPacketStats()
|
||||
|
|
|
@ -114,8 +114,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
//private UDPClientCollection m_clients = new UDPClientCollection();
|
||||
/// <summary>Bandwidth throttle for this UDP server</summary>
|
||||
protected TokenBucket m_throttle;
|
||||
|
||||
/// <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>
|
||||
private AgentCircuitManager m_circuitManager;
|
||||
/// <summary>Reference to the scene this UDP server is attached to</summary>
|
||||
|
@ -226,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
#endregion BinaryStats
|
||||
|
||||
m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps);
|
||||
m_throttleRates = new ThrottleRates(configSource);
|
||||
ThrottleRates = new ThrottleRates(configSource);
|
||||
}
|
||||
|
||||
public void Start()
|
||||
|
@ -585,8 +587,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
// Stats tracking
|
||||
Interlocked.Increment(ref udpClient.PacketsSent);
|
||||
if (isReliable)
|
||||
Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength);
|
||||
|
||||
// Put the UDP payload on the wire
|
||||
AsyncBeginSend(buffer);
|
||||
|
@ -859,9 +859,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// Acknowledge the UseCircuitCode packet
|
||||
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
||||
buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
||||
// m_log.DebugFormat(
|
||||
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
||||
// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
||||
}
|
||||
|
||||
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)
|
||||
|
@ -924,7 +924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
|
||||
{
|
||||
// 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;
|
||||
|
||||
if (!m_scene.TryGetClient(agentID, out existingClient))
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public void Add(OutgoingPacket packet)
|
||||
{
|
||||
m_pendingAdds.Enqueue(packet);
|
||||
Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -139,34 +141,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
private void ProcessQueues()
|
||||
{
|
||||
// Process all the pending adds
|
||||
|
||||
OutgoingPacket pendingAdd;
|
||||
if (m_pendingAdds != null)
|
||||
{
|
||||
while (m_pendingAdds.TryDequeue(out pendingAdd))
|
||||
{
|
||||
if (pendingAdd != null && m_packets != null)
|
||||
{
|
||||
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process all the pending removes, including updating statistics and round-trip times
|
||||
PendingAck pendingRemove;
|
||||
OutgoingPacket ackedPacket;
|
||||
if (m_pendingRemoves != null)
|
||||
{
|
||||
while (m_pendingRemoves.TryDequeue(out pendingRemove))
|
||||
{
|
||||
if (m_pendingRemoves != null && m_packets != null)
|
||||
{
|
||||
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
|
||||
{
|
||||
m_packets.Remove(pendingRemove.SequenceNumber);
|
||||
|
||||
// Update stats
|
||||
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
|
||||
if (!pendingRemove.FromResend)
|
||||
{
|
||||
|
@ -180,5 +169,3 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
/// </summary>
|
||||
public class AgentAssetTransactions
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Fields
|
||||
private bool m_dumpAssetsToFile;
|
||||
|
|
|
@ -49,8 +49,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
|
|||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GetMeshModule : INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private IAssetService m_assetService;
|
||||
|
||||
|
@ -102,7 +103,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
|
|||
{
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
m_log.Info("[GETMESH]: /CAPS/" + capID);
|
||||
// m_log.Info("[GETMESH]: /CAPS/" + capID);
|
||||
caps.RegisterHandler("GetMesh",
|
||||
new RestHTTPHandler("GET", "/CAPS/" + capID,
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
{
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
|
||||
// m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
|
||||
caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
/// <returns>False for "caller try another codec"; true otherwise</returns>
|
||||
private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format)
|
||||
{
|
||||
m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
|
||||
// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
|
||||
AssetBase texture;
|
||||
|
||||
string fullID = textureID.ToString();
|
||||
|
|
|
@ -50,8 +50,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
|
|||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private IAssetService m_assetService;
|
||||
private bool m_dumpAssetsToFile = false;
|
||||
|
@ -104,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
|
|||
{
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
m_log.Info("[GETMESH]: /CAPS/" + capID);
|
||||
// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);
|
||||
caps.RegisterHandler("NewFileAgentInventoryVariablePrice",
|
||||
|
||||
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST",
|
||||
|
|
|
@ -132,8 +132,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
"[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId
|
||||
+ ", AttachmentPoint: " + AttachmentPt);
|
||||
|
||||
if (m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -336,7 +334,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||
item = m_scene.InventoryService.GetItem(item);
|
||||
|
||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
||||
bool changed = presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
|
||||
}
|
||||
|
||||
return att.UUID;
|
||||
|
@ -380,9 +380,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
// XXYY!!
|
||||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||
item = m_scene.InventoryService.GetItem(item);
|
||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */);
|
||||
|
||||
if (m_scene.AvatarFactory != null)
|
||||
bool changed = presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
|
@ -402,11 +401,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
ScenePresence presence;
|
||||
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
presence.Appearance.DetachAttachment(itemID);
|
||||
|
||||
// Save avatar attachment information
|
||||
m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
|
||||
if (m_scene.AvatarFactory != null)
|
||||
|
||||
bool changed = presence.Appearance.DetachAttachment(itemID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
|
||||
}
|
||||
|
||||
|
@ -431,9 +430,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
part.ParentGroup.PrimCount, remoteClient.AgentId, presence.AbsolutePosition))
|
||||
return;
|
||||
|
||||
presence.Appearance.DetachAttachment(itemID);
|
||||
|
||||
if (m_scene.AvatarFactory != null)
|
||||
bool changed = presence.Appearance.DetachAttachment(itemID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
|
||||
|
||||
part.ParentGroup.DetachToGround();
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
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
|
||||
// textureEntry set implies that the appearance transaction is complete
|
||||
|
@ -217,6 +217,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
// update transaction. In theory, we should be able to do an immediate
|
||||
// appearance send and save here.
|
||||
|
||||
// save only if there were changes, send no matter what (doesn't hurt to send twice)
|
||||
if (changed)
|
||||
QueueAppearanceSave(client.AgentId);
|
||||
QueueAppearanceSend(client.AgentId);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
|
|||
item = invService.GetItem(item);
|
||||
if (item != null)
|
||||
{
|
||||
item.Flags = 1;
|
||||
item.Flags |= 1;
|
||||
invService.UpdateItem(item);
|
||||
}
|
||||
else
|
||||
|
@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
|
|||
item = invService.GetItem(item);
|
||||
if (item != null)
|
||||
{
|
||||
item.Flags = 0;
|
||||
item.Flags &= ~(uint)1;
|
||||
invService.UpdateItem(item);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
if (!user.IsChildAgent)
|
||||
{
|
||||
// Local message
|
||||
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
|
||||
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
|
||||
user.ControllingClient.SendInstantMessage(im);
|
||||
|
||||
// Message sent
|
||||
|
@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
// Local message
|
||||
ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
|
||||
|
||||
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID);
|
||||
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID);
|
||||
user.ControllingClient.SendInstantMessage(im);
|
||||
|
||||
// Message sent
|
||||
|
@ -177,7 +177,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);
|
||||
|
||||
return;
|
||||
|
|
|
@ -43,8 +43,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
{
|
||||
public class ObjectAdd : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
#region IRegionModule Members
|
||||
|
||||
|
@ -63,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
{
|
||||
UUID capuuid = UUID.Random();
|
||||
|
||||
m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
|
||||
caps.RegisterHandler("ObjectAdd",
|
||||
new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/",
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
{
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
m_log.Info("[UploadObjectAssetModule]: /CAPS/" + capID);
|
||||
// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
|
||||
caps.RegisterHandler("UploadObjectAsset",
|
||||
new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/",
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
|
@ -156,7 +156,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation);
|
||||
Quaternion rot = Quaternion.Identity;
|
||||
Vector3 rootpos = Vector3.Zero;
|
||||
Quaternion rootrot = Quaternion.Identity;
|
||||
// Quaternion rootrot = Quaternion.Identity;
|
||||
|
||||
SceneObjectGroup rootGroup = null;
|
||||
SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length];
|
||||
|
@ -186,11 +186,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
if (i == 0)
|
||||
{
|
||||
rootpos = obj.Position;
|
||||
rootrot = obj.Rotation;
|
||||
|
||||
// rootrot = obj.Rotation;
|
||||
}
|
||||
|
||||
|
||||
// Combine the extraparams data into it's ugly blob again....
|
||||
//int bytelength = 0;
|
||||
//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));
|
||||
|
||||
return responsedata;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private string ConvertUintToBytes(uint val)
|
||||
{
|
||||
byte[] resultbytes = Utils.UIntToBytes(val);
|
||||
|
|
|
@ -767,6 +767,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
LookupUUIDS icon = (LookupUUIDS)iar.AsyncState;
|
||||
icon.EndInvoke(iar);
|
||||
}
|
||||
|
||||
private void LookupUUID(List<UUID> uuidLst)
|
||||
{
|
||||
LookupUUIDS d = LookupUUIDsAsync;
|
||||
|
@ -775,6 +776,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
LookupUUIDSCompleted,
|
||||
d);
|
||||
}
|
||||
|
||||
private void LookupUUIDsAsync(List<UUID> uuidLst)
|
||||
{
|
||||
UUID[] uuidarr;
|
||||
|
@ -789,12 +791,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
// string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
|
||||
|
||||
IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>();
|
||||
string userName = "Unkown User";
|
||||
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.
|
||||
// diva commnent 11/21/2010: uh?!? wft?
|
||||
// justincc comment 21/01/2011: A side effect of userManager.GetUserName() I presume.
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
|
@ -37,19 +38,22 @@ using OpenMetaverse.StructuredData;
|
|||
using OpenMetaverse.Messages.Linden;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Land
|
||||
{
|
||||
// used for caching
|
||||
internal class ExtendedLandData {
|
||||
internal class ExtendedLandData
|
||||
{
|
||||
public LandData LandData;
|
||||
public ulong RegionHandle;
|
||||
public uint X, Y;
|
||||
|
@ -65,6 +69,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
private LandChannel landChannel;
|
||||
private Scene m_scene;
|
||||
protected Commander m_commander = new Commander("land");
|
||||
|
||||
protected IUserManagement m_userManager;
|
||||
|
||||
// Minimum for parcels to work is 64m even if we don't actually use them.
|
||||
#pragma warning disable 0429
|
||||
|
@ -127,19 +134,27 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
|
||||
m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted;
|
||||
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
|
||||
m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
|
||||
|
||||
lock (m_scene)
|
||||
{
|
||||
m_scene.LandChannel = (ILandChannel)landChannel;
|
||||
}
|
||||
|
||||
InstallInterfaces();
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
m_userManager = m_scene.RequestModuleInterface<IUserManagement>();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
// TODO: Also release other event manager listeners here
|
||||
|
||||
m_scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole;
|
||||
m_scene.UnregisterModuleCommander(m_commander.Name);
|
||||
}
|
||||
|
||||
// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
|
||||
|
@ -149,6 +164,29 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// return nearestParcel != null;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Processes commandline input. Do not call directly.
|
||||
/// </summary>
|
||||
/// <param name="args">Commandline arguments</param>
|
||||
protected void EventManagerOnPluginConsole(string[] args)
|
||||
{
|
||||
if (args[0] == "land")
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
m_commander.ProcessConsoleCommand("help", new string[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
string[] tmpArgs = new string[args.Length - 2];
|
||||
int i;
|
||||
for (i = 2; i < args.Length; i++)
|
||||
tmpArgs[i - 2] = args[i];
|
||||
|
||||
m_commander.ProcessConsoleCommand(args[1], tmpArgs);
|
||||
}
|
||||
}
|
||||
|
||||
void EventManagerOnNewClient(IClientAPI client)
|
||||
{
|
||||
//Register some client events
|
||||
|
@ -209,11 +247,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -223,11 +256,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
get { return "LandManagementModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Parcel Add/Remove/Get/Create
|
||||
|
@ -1591,5 +1619,44 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
UpdateLandObject(localID, land.LandData);
|
||||
}
|
||||
|
||||
protected void InstallInterfaces()
|
||||
{
|
||||
Command showCommand =
|
||||
new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowParcelsCommand, "Shows all parcels on the current region.");
|
||||
|
||||
m_commander.RegisterCommand("show", showCommand);
|
||||
|
||||
// Add this to our scene so scripts can call these functions
|
||||
m_scene.RegisterModuleCommander(m_commander);
|
||||
}
|
||||
|
||||
protected void ShowParcelsCommand(Object[] args)
|
||||
{
|
||||
StringBuilder report = new StringBuilder();
|
||||
|
||||
report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName);
|
||||
report.AppendFormat(
|
||||
"{0,-20} {1,-9} {2,-18} {3,-18} {4,-20}\n",
|
||||
"Parcel Name",
|
||||
"Area",
|
||||
"Starts",
|
||||
"Ends",
|
||||
"Owner");
|
||||
|
||||
lock (m_landList)
|
||||
{
|
||||
foreach (ILandObject lo in m_landList.Values)
|
||||
{
|
||||
LandData ld = lo.LandData;
|
||||
|
||||
report.AppendFormat(
|
||||
"{0,-20} {1,-9} {2,-18} {3,-18} {4,-20}\n",
|
||||
ld.Name, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
|
||||
}
|
||||
}
|
||||
|
||||
MainConsole.Instance.Output(report.ToString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,6 +78,42 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
get { return m_scene.RegionInfo.RegionID; }
|
||||
}
|
||||
|
||||
public Vector3 StartPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int y = 0; y < landArrayMax; y++)
|
||||
{
|
||||
for (int x = 0; x < landArrayMax; x++)
|
||||
{
|
||||
if (LandBitmap[x, y])
|
||||
return new Vector3(x * 4, y * 4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return new Vector3(-1, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 EndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int y = landArrayMax - 1; y >= 0; y--)
|
||||
{
|
||||
for (int x = landArrayMax - 1; x >= 0; x--)
|
||||
{
|
||||
if (LandBitmap[x, y])
|
||||
{
|
||||
return new Vector3(x * 4, y * 4, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Vector3(-1, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
#region Constructors
|
||||
|
||||
public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
|
||||
|
@ -217,6 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
ParcelFlags.AllowDamage |
|
||||
ParcelFlags.CreateObjects |
|
||||
ParcelFlags.RestrictPushObject |
|
||||
ParcelFlags.AllowOtherScripts |
|
||||
ParcelFlags.AllowGroupScripts |
|
||||
ParcelFlags.CreateGroupObjects |
|
||||
ParcelFlags.AllowAPrimitiveEntry |
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
|
|||
private static readonly ILog m_log =
|
||||
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 string m_savedir = "exports";
|
||||
private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>();
|
||||
|
@ -77,14 +77,13 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
|
|||
m_serialisers.Add(new SerialiseObjects());
|
||||
}
|
||||
|
||||
LoadCommanderCommands();
|
||||
// LoadCommanderCommands();
|
||||
}
|
||||
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
scene.RegisterModuleCommander(m_commander);
|
||||
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||
// scene.RegisterModuleCommander(m_commander);
|
||||
// scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||
scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
|
||||
|
||||
lock (m_regions)
|
||||
|
@ -211,18 +210,18 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
|
|||
|
||||
#endregion
|
||||
|
||||
private void EventManager_OnPluginConsole(string[] args)
|
||||
{
|
||||
if (args[0] == "export")
|
||||
{
|
||||
string[] tmpArgs = new string[args.Length - 2];
|
||||
int i = 0;
|
||||
for (i = 2; i < args.Length; i++)
|
||||
tmpArgs[i - 2] = args[i];
|
||||
|
||||
m_commander.ProcessConsoleCommand(args[1], tmpArgs);
|
||||
}
|
||||
}
|
||||
// private void EventManager_OnPluginConsole(string[] args)
|
||||
// {
|
||||
// if (args[0] == "export")
|
||||
// {
|
||||
// string[] tmpArgs = new string[args.Length - 2];
|
||||
// int i = 0;
|
||||
// for (i = 2; i < args.Length; i++)
|
||||
// tmpArgs[i - 2] = args[i];
|
||||
//
|
||||
// m_commander.ProcessConsoleCommand(args[1], tmpArgs);
|
||||
// }
|
||||
// }
|
||||
|
||||
private void InterfaceSaveRegion(Object[] args)
|
||||
{
|
||||
|
@ -245,15 +244,15 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
|
|||
}
|
||||
}
|
||||
|
||||
private void LoadCommanderCommands()
|
||||
{
|
||||
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");
|
||||
|
||||
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-all", serialiseAllScenesCommand);
|
||||
}
|
||||
// private void LoadCommanderCommands()
|
||||
// {
|
||||
// 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");
|
||||
//
|
||||
// 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-all", serialiseAllScenesCommand);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
|||
{
|
||||
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;
|
||||
|
||||
|
|
|
@ -85,9 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
|||
public static float noise1(float arg)
|
||||
{
|
||||
int bx0, bx1;
|
||||
float rx0, rx1, sx, t, u, v, a;
|
||||
|
||||
a = arg;
|
||||
float rx0, rx1, sx, t, u, v;
|
||||
|
||||
t = arg + N;
|
||||
bx0 = ((int)t) & BM;
|
||||
|
|
|
@ -641,7 +641,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
lock (m_openRequests)
|
||||
m_openRequests.Add(requestID, mrs);
|
||||
|
||||
WebRequest mapitemsrequest = WebRequest.Create(httpserver);
|
||||
WebRequest mapitemsrequest = null;
|
||||
try
|
||||
{
|
||||
mapitemsrequest = WebRequest.Create(httpserver);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[WORLD MAP]: Access to {0} failed with {1}", httpserver, e);
|
||||
return new OSDMap();
|
||||
}
|
||||
|
||||
mapitemsrequest.Method = "POST";
|
||||
mapitemsrequest.ContentType = "application/xml+llsd";
|
||||
OSDMap RAMap = new OSDMap();
|
||||
|
|
|
@ -43,7 +43,21 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
LandData LandData { get; set; }
|
||||
bool[,] LandBitmap { get; set; }
|
||||
UUID RegionUUID { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The start point for the land object. This is the western-most point as one scans land working from
|
||||
/// north to south.
|
||||
/// </summary>
|
||||
Vector3 StartPoint { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The end point for the land object. This is the eastern-most point as one scans land working from
|
||||
/// south to north.
|
||||
/// </summary>
|
||||
Vector3 EndPoint { get; }
|
||||
|
||||
bool ContainsPoint(int x, int y);
|
||||
|
||||
ILandObject Copy();
|
||||
|
||||
void SendLandUpdateToAvatarsOverMe();
|
||||
|
|
|
@ -498,12 +498,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
get { return m_sceneGraph.Entities; }
|
||||
}
|
||||
|
||||
public Dictionary<UUID, ScenePresence> m_restorePresences
|
||||
{
|
||||
get { return m_sceneGraph.RestorePresences; }
|
||||
set { m_sceneGraph.RestorePresences = value; }
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Constructors
|
||||
|
@ -2483,37 +2477,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
(aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
|
||||
|
||||
CheckHeartbeat();
|
||||
ScenePresence presence;
|
||||
|
||||
if (m_restorePresences.ContainsKey(client.AgentId))
|
||||
{
|
||||
m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
|
||||
|
||||
m_clientManager.Add(client);
|
||||
SubscribeToClientEvents(client);
|
||||
|
||||
presence = m_restorePresences[client.AgentId];
|
||||
m_restorePresences.Remove(client.AgentId);
|
||||
|
||||
// This is one of two paths to create avatars that are
|
||||
// used. This tends to get called more in standalone
|
||||
// than grid, not really sure why, but as such needs
|
||||
// an explicity appearance lookup here.
|
||||
AvatarAppearance appearance = null;
|
||||
GetAvatarAppearance(client, out appearance);
|
||||
presence.Appearance = appearance;
|
||||
|
||||
presence.initializeScenePresence(client, RegionInfo, this);
|
||||
|
||||
m_sceneGraph.AddScenePresence(presence);
|
||||
|
||||
lock (m_restorePresences)
|
||||
{
|
||||
Monitor.PulseAll(m_restorePresences);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here
|
||||
{
|
||||
m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
|
||||
|
@ -2521,20 +2485,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_clientManager.Add(client);
|
||||
SubscribeToClientEvents(client);
|
||||
|
||||
ScenePresence sp = CreateAndAddScenePresence(client);
|
||||
if (aCircuit != null)
|
||||
sp.Appearance = aCircuit.Appearance;
|
||||
ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance);
|
||||
m_eventManager.TriggerOnNewPresence(sp);
|
||||
|
||||
sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags;
|
||||
|
||||
// HERE!!! Do the initial attachments right here
|
||||
// first agent upon login is a root agent by design.
|
||||
// All other AddNewClient calls find aCircuit.child to be true
|
||||
if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
|
||||
if (aCircuit.child == false)
|
||||
{
|
||||
sp.IsChildAgent = false;
|
||||
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GetScenePresence(client.AgentId) != null)
|
||||
{
|
||||
|
@ -2996,25 +2960,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_dialogModule.SendAlertToUser(remoteClient, "Set Home request Failed.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a child agent scene presence and add it to this scene.
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client)
|
||||
{
|
||||
CheckHeartbeat();
|
||||
AvatarAppearance appearance = null;
|
||||
GetAvatarAppearance(client, out appearance);
|
||||
|
||||
ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance);
|
||||
//avatar.KnownRegions = GetChildrenSeeds(avatar.UUID);
|
||||
|
||||
m_eventManager.TriggerOnNewPresence(avatar);
|
||||
|
||||
return avatar;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the avatar apperance for the given client.
|
||||
/// </summary>
|
||||
|
@ -3324,6 +3269,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
else
|
||||
{
|
||||
// Let the SP know how we got here. This has a lot of interesting
|
||||
// uses down the line.
|
||||
sp.TeleportFlags = (TeleportFlags)teleportFlags;
|
||||
|
||||
if (sp.IsChildAgent)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
|
|
|
@ -73,7 +73,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
protected List<ScenePresence> m_scenePresenceArray = new List<ScenePresence>();
|
||||
|
||||
protected internal EntityManager Entities = new EntityManager();
|
||||
protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>();
|
||||
|
||||
protected RegionInfo m_regInfo;
|
||||
protected Scene m_parentScene;
|
||||
|
@ -564,8 +563,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
ScenePresence newAvatar = null;
|
||||
|
||||
// ScenePresence always defaults to child agent
|
||||
newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance);
|
||||
newAvatar.IsChildAgent = true;
|
||||
|
||||
AddScenePresence(newAvatar);
|
||||
|
||||
|
@ -578,6 +577,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="presence"></param>
|
||||
protected internal void AddScenePresence(ScenePresence presence)
|
||||
{
|
||||
// Always a child when added to the scene
|
||||
bool child = presence.IsChildAgent;
|
||||
|
||||
if (child)
|
||||
|
|
|
@ -178,6 +178,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
item.LastOwnerID = item.OwnerID;
|
||||
item.OwnerID = ownerId;
|
||||
item.PermsMask = 0;
|
||||
item.PermsGranter = UUID.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -695,7 +697,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
item.ParentID = m_part.UUID;
|
||||
item.ParentPartID = m_part.UUID;
|
||||
item.Flags = m_items[item.ItemID].Flags;
|
||||
|
||||
// If group permissions have been set on, check that the groupID is up to date in case it has
|
||||
// changed since permissions were last set.
|
||||
|
@ -850,7 +851,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="xferManager"></param>
|
||||
public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
|
||||
{
|
||||
bool changed = CreateInventoryFile();
|
||||
CreateInventoryFile();
|
||||
|
||||
if (m_inventorySerial == 0) // No inventory
|
||||
{
|
||||
|
@ -1013,6 +1014,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
item.BasePermissions &= item.NextPermissions;
|
||||
item.EveryonePermissions &= item.NextPermissions;
|
||||
item.OwnerChanged = true;
|
||||
item.PermsMask = 0;
|
||||
item.PermsGranter = UUID.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
private bool m_updateflag;
|
||||
private byte m_movementflag;
|
||||
private Vector3? m_forceToApply;
|
||||
private TeleportFlags m_teleportFlags;
|
||||
public TeleportFlags TeleportFlags
|
||||
{
|
||||
get { return m_teleportFlags; }
|
||||
set { m_teleportFlags = value; }
|
||||
}
|
||||
|
||||
private uint m_requestedSitTargetID;
|
||||
private UUID m_requestedSitTargetUUID;
|
||||
public bool SitGround = false;
|
||||
|
@ -928,10 +935,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//else
|
||||
// m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid);
|
||||
|
||||
// On the next prim update, all objects will be sent
|
||||
//
|
||||
m_sceneViewer.Reset();
|
||||
|
||||
m_isChildAgent = false;
|
||||
|
||||
// send the animations of the other presences to me
|
||||
|
@ -953,6 +956,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void MakeChildAgent()
|
||||
{
|
||||
// Reset these so that teleporting in and walking out isn't seen
|
||||
// as teleporting back
|
||||
m_teleportFlags = TeleportFlags.Default;
|
||||
|
||||
// It looks like m_animator is set to null somewhere, and MakeChild
|
||||
// is called after that. Probably in aborted teleports.
|
||||
if (m_animator == null)
|
||||
|
@ -1108,7 +1115,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void CompleteMovement(IClientAPI client)
|
||||
{
|
||||
DateTime startTime = DateTime.Now;
|
||||
// DateTime startTime = DateTime.Now;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE]: Completing movement of {0} into region {1}",
|
||||
|
@ -1161,9 +1168,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
|
||||
}
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
||||
client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
||||
// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -2952,10 +2959,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
|
||||
ControllingClient.SetChildAgentThrottle(cAgentData.Throttles);
|
||||
|
||||
// Sends out the objects in the user's draw distance if m_sendTasksToChild is true.
|
||||
if (m_scene.m_seeIntoRegionFromNeighbor)
|
||||
m_sceneViewer.Reset();
|
||||
|
||||
//cAgentData.AVHeight;
|
||||
m_rootRegionHandle = cAgentData.RegionHandle;
|
||||
//m_velocity = cAgentData.Velocity;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Grid
|
|||
{
|
||||
public class GridInfoServerInConnector : ServiceConnector
|
||||
{
|
||||
private string m_ConfigName = "GridInfoService";
|
||||
// private string m_ConfigName = "GridInfoService";
|
||||
|
||||
public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) :
|
||||
base(config, server, configName)
|
||||
|
|
|
@ -51,7 +51,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
{
|
||||
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;
|
||||
|
||||
public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy)
|
||||
|
|
|
@ -41,9 +41,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
{
|
||||
public class GatekeeperServiceInConnector : ServiceConnector
|
||||
{
|
||||
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;
|
||||
public IGatekeeperService GateKeeper
|
||||
|
|
|
@ -215,14 +215,21 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
|
||||
// We're behind a proxy
|
||||
Hashtable headers = (Hashtable)request["headers"];
|
||||
if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null)
|
||||
{
|
||||
m_log.DebugFormat("[HOME AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]);
|
||||
string xff = "X-Forwarded-For";
|
||||
if (headers.ContainsKey(xff.ToLower()))
|
||||
xff = xff.ToLower();
|
||||
|
||||
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]);
|
||||
if (!headers.ContainsKey(xff) || headers[xff] == null)
|
||||
{
|
||||
m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
|
||||
return Util.GetCallerIP(request);
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
|
||||
|
||||
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
|
||||
if (ep != null)
|
||||
return ep.Address.ToString();
|
||||
}
|
||||
|
||||
// Oops
|
||||
return Util.GetCallerIP(request);
|
||||
|
|
|
@ -47,9 +47,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
{
|
||||
public class UserAgentServerConnector : ServiceConnector
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IUserAgentService m_HomeUsersService;
|
||||
|
||||
|
|
|
@ -347,7 +347,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleAddFolder(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||
InventoryFolderBase folder = BuildFolder(request);
|
||||
|
||||
if (m_InventoryService.AddFolder(folder))
|
||||
|
@ -358,7 +357,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleUpdateFolder(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
InventoryFolderBase folder = BuildFolder(request);
|
||||
|
||||
if (m_InventoryService.UpdateFolder(folder))
|
||||
|
@ -369,7 +367,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleMoveFolder(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
UUID parentID = UUID.Zero;
|
||||
UUID.TryParse(request["ParentID"].ToString(), out parentID);
|
||||
UUID folderID = UUID.Zero;
|
||||
|
@ -387,7 +384,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleDeleteFolders(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||
UUID principal = UUID.Zero;
|
||||
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||
List<string> slist = (List<string>)request["FOLDERS"];
|
||||
|
@ -408,7 +404,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandlePurgeFolder(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||
UUID folderID = UUID.Zero;
|
||||
UUID.TryParse(request["ID"].ToString(), out folderID);
|
||||
|
||||
|
@ -421,7 +416,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleAddItem(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
InventoryItemBase item = BuildItem(request);
|
||||
|
||||
if (m_InventoryService.AddItem(item))
|
||||
|
@ -432,7 +426,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleUpdateItem(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
InventoryItemBase item = BuildItem(request);
|
||||
|
||||
if (m_InventoryService.UpdateItem(item))
|
||||
|
@ -443,7 +436,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleMoveItems(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||
List<string> idlist = (List<string>)request["IDLIST"];
|
||||
List<string> destlist = (List<string>)request["DESTLIST"];
|
||||
UUID principal = UUID.Zero;
|
||||
|
@ -482,7 +474,6 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
|
||||
byte[] HandleDeleteItems(Dictionary<string,object> request)
|
||||
{
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
UUID principal = UUID.Zero;
|
||||
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||
List<string> slist = (List<string>)request["ITEMS"];
|
||||
|
|
|
@ -129,8 +129,6 @@ namespace OpenSim.Server.Handlers.Presence
|
|||
byte[] LogoutAgent(Dictionary<string, object> request)
|
||||
{
|
||||
UUID session = UUID.Zero;
|
||||
Vector3 position = Vector3.Zero;
|
||||
Vector3 lookat = Vector3.Zero;
|
||||
|
||||
if (!request.ContainsKey("SessionID"))
|
||||
return FailureResult();
|
||||
|
|
|
@ -200,14 +200,21 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
// We're behind a proxy
|
||||
Hashtable headers = (Hashtable)request["headers"];
|
||||
if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null)
|
||||
{
|
||||
m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]);
|
||||
string xff = "X-Forwarded-For";
|
||||
if (headers.ContainsKey(xff.ToLower()))
|
||||
xff = xff.ToLower();
|
||||
|
||||
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]);
|
||||
if (!headers.ContainsKey(xff) || headers[xff] == null)
|
||||
{
|
||||
m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
|
||||
return Util.GetCallerIP(request);
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
|
||||
|
||||
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
|
||||
if (ep != null)
|
||||
return ep.Address.ToString();
|
||||
}
|
||||
|
||||
// Oops
|
||||
return Util.GetCallerIP(request);
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
public class SimulationServiceInConnector : ServiceConnector
|
||||
{
|
||||
private ISimulationService m_LocalSimulationService;
|
||||
private IAuthenticationService m_AuthenticationService;
|
||||
// private IAuthenticationService m_AuthenticationService;
|
||||
|
||||
public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
|
||||
base(config, server, String.Empty)
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_ServerURI = String.Empty;
|
||||
private bool m_Enabled = false;
|
||||
// private bool m_Enabled = false;
|
||||
|
||||
public SimianGridServiceConnector() { }
|
||||
public SimianGridServiceConnector(string serverURI)
|
||||
|
@ -93,7 +93,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||
serviceUrl = serviceUrl + '/';
|
||||
m_ServerURI = serviceUrl;
|
||||
m_Enabled = true;
|
||||
// m_Enabled = true;
|
||||
}
|
||||
|
||||
#region IGridService
|
||||
|
@ -175,7 +175,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
}
|
||||
}
|
||||
|
||||
m_log.Debug("[SIMIAN GRID CONNECTOR]: Found " + regions.Count + " neighbors for region " + regionID);
|
||||
// m_log.Debug("[SIMIAN GRID CONNECTOR]: Found " + regions.Count + " neighbors for region " + regionID);
|
||||
return regions;
|
||||
}
|
||||
|
||||
|
|
|
@ -757,7 +757,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
}
|
||||
}
|
||||
|
||||
m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invFolders.Count + " folders from SimianGrid response");
|
||||
// m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invFolders.Count + " folders from SimianGrid response");
|
||||
return invFolders;
|
||||
}
|
||||
|
||||
|
@ -824,7 +824,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
}
|
||||
}
|
||||
|
||||
m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invItems.Count + " items from SimianGrid response");
|
||||
// m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invItems.Count + " items from SimianGrid response");
|
||||
return invItems;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public bool LogoutAgent(UUID sessionID)
|
||||
{
|
||||
m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for agent with sessionID " + sessionID);
|
||||
// m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for agent with sessionID " + sessionID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public bool LogoutRegionAgents(UUID regionID)
|
||||
{
|
||||
m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for all agents in region " + regionID);
|
||||
// m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for all agents in region " + regionID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public PresenceInfo GetAgent(UUID sessionID)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent with sessionID " + sessionID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent with sessionID " + sessionID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Logging out user " + userID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Logging out user " + userID);
|
||||
|
||||
// Remove the session to mark this user offline
|
||||
if (!LogoutAgent(sessionID))
|
||||
|
@ -287,7 +287,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public bool SetHome(string userID, UUID regionID, Vector3 position, Vector3 lookAt)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Setting home location for user " + userID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Setting home location for user " + userID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -312,10 +312,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public GridUserInfo GetGridUserInfo(string user)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);
|
||||
|
||||
UUID userID = new UUID(user);
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -338,7 +338,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
private OSDMap GetUserData(UUID userID)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
OSDMap userResponse = GetUserData(userID);
|
||||
if (userResponse != null)
|
||||
{
|
||||
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting sessions for " + userID);
|
||||
// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting sessions for " + userID);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -377,10 +377,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
if (presence != null)
|
||||
presences.Add(presence);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString());
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString());
|
||||
// }
|
||||
}
|
||||
|
||||
return presences;
|
||||
|
@ -424,7 +424,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
{
|
||||
if (userResponse != null && userResponse["User"] is OSDMap)
|
||||
{
|
||||
|
||||
GridUserInfo info = new GridUserInfo();
|
||||
|
||||
info.Online = true;
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
{
|
||||
List<UserAccount> accounts = new List<UserAccount>();
|
||||
|
||||
m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Searching for user accounts with name query " + query);
|
||||
// m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Searching for user accounts with name query " + query);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public bool StoreUserAccount(UserAccount data)
|
||||
{
|
||||
m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account for " + data.Name);
|
||||
// m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account for " + data.Name);
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
private UserAccount GetUser(NameValueCollection requestArgs)
|
||||
{
|
||||
string lookupValue = (requestArgs.Count > 1) ? requestArgs[1] : "(Unknown)";
|
||||
m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Looking up user account with query: " + lookupValue);
|
||||
// m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Looking up user account with query: " + lookupValue);
|
||||
|
||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
||||
if (response["Success"].AsBoolean())
|
||||
|
|
|
@ -43,9 +43,9 @@ namespace OpenSim.Services.Connectors
|
|||
{
|
||||
public class EstateDataService : ServiceBase, IEstateDataService
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected IEstateDataStore m_database;
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ namespace OpenSim.Services.Connectors
|
|||
{
|
||||
public class SimulationDataService : ServiceBase, ISimulationDataService
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected ISimulationDataStore m_database;
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
|
||||
try
|
||||
{
|
||||
OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"DELETE",10000);
|
||||
WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
|
||||
try
|
||||
{
|
||||
OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"DELETE",10000);
|
||||
WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||
|
||||
OSDMap result = WebUtil.PostToService(uri,args);
|
||||
WebUtil.PostToService(uri, args);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -303,7 +303,7 @@ namespace OpenSim.Services.HypergridService
|
|||
return m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID);
|
||||
else
|
||||
{
|
||||
Object[] args = new Object[] { userURL };
|
||||
// Object[] args = new Object[] { userURL };
|
||||
IUserAgentService userAgentService = new UserAgentServiceConnector(userURL);
|
||||
if (userAgentService != null)
|
||||
{
|
||||
|
|
|
@ -13,9 +13,10 @@ namespace OpenSim.Services.HypergridService
|
|||
{
|
||||
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
|
||||
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private ExpiringCache<UUID, UserAccount> m_UUIDCache;
|
||||
|
||||
private IUserAccountService m_UserAccountService;
|
||||
|
|
|
@ -661,7 +661,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
protected virtual ArrayList GetInventoryLibrary(ILibraryService library)
|
||||
{
|
||||
Dictionary<UUID, InventoryFolderImpl> rootFolders = library.GetAllFolders();
|
||||
m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count);
|
||||
// m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count);
|
||||
//Dictionary<UUID, InventoryFolderImpl> rootFolders = new Dictionary<UUID,InventoryFolderImpl>();
|
||||
ArrayList folderHashes = new ArrayList();
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
// Get active gestures
|
||||
List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(account.PrincipalID);
|
||||
m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count);
|
||||
// m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count);
|
||||
|
||||
//
|
||||
// Login the presence
|
||||
|
@ -320,7 +320,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
Vector3 position = Vector3.Zero;
|
||||
Vector3 lookAt = Vector3.Zero;
|
||||
GridRegion gatekeeper = null;
|
||||
GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt);
|
||||
TeleportFlags flags;
|
||||
GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags);
|
||||
if (destination == null)
|
||||
{
|
||||
m_PresenceService.LogoutAgent(session);
|
||||
|
@ -328,6 +329,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
return LLFailedLoginResponse.GridProblem;
|
||||
}
|
||||
|
||||
if (account.UserLevel >= 200)
|
||||
flags |= TeleportFlags.Godlike;
|
||||
//
|
||||
// Get the avatar
|
||||
//
|
||||
|
@ -343,7 +346,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
string reason = string.Empty;
|
||||
GridRegion dest;
|
||||
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
|
||||
clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
|
||||
clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest);
|
||||
destination = dest;
|
||||
if (aCircuit == null)
|
||||
{
|
||||
|
@ -378,8 +381,10 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
}
|
||||
|
||||
protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt)
|
||||
protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
|
||||
{
|
||||
flags = TeleportFlags.ViaLogin;
|
||||
|
||||
m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation);
|
||||
|
||||
gatekeeper = null;
|
||||
|
@ -473,6 +478,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
else
|
||||
{
|
||||
flags |= TeleportFlags.ViaRegionID;
|
||||
|
||||
// free uri form
|
||||
// e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
|
||||
where = "url";
|
||||
|
@ -624,7 +631,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar,
|
||||
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
|
||||
IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
|
||||
IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest)
|
||||
{
|
||||
where = currentWhere;
|
||||
ISimulationService simConnector = null;
|
||||
|
@ -663,7 +670,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
{
|
||||
circuitCode = (uint)Util.RandomClass.Next(); ;
|
||||
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
|
||||
success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
|
||||
success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason);
|
||||
if (!success && m_GridService != null)
|
||||
{
|
||||
// Try the fallback regions
|
||||
|
@ -672,7 +679,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
{
|
||||
foreach (GridRegion r in fallbacks)
|
||||
{
|
||||
success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason);
|
||||
success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason);
|
||||
if (success)
|
||||
{
|
||||
where = "safe";
|
||||
|
@ -795,9 +802,9 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
}
|
||||
|
||||
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason)
|
||||
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
|
||||
{
|
||||
return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason);
|
||||
return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason);
|
||||
}
|
||||
|
||||
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
|
||||
|
|
150
prebuild.xml
150
prebuild.xml
|
@ -1439,60 +1439,6 @@
|
|||
</Files>
|
||||
</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">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
|
@ -1556,7 +1502,6 @@
|
|||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework.Statistics"/>
|
||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||
<Reference name="OpenSim.Region.CoreModules"/>
|
||||
<Reference name="XMLRPC" path="../../../bin/"/>
|
||||
<Reference name="Nini" path="../../../bin/"/>
|
||||
<Reference name="log4net" path="../../../bin/"/>
|
||||
|
@ -1607,6 +1552,61 @@
|
|||
</Files>
|
||||
</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 -->
|
||||
<Project frameworkVersion="v3_5" name="OpenSim.Data.Null" path="OpenSim/Data/Null" type="Library">
|
||||
<Configuration name="Debug">
|
||||
|
@ -1991,7 +1991,6 @@
|
|||
</Files>
|
||||
</Project>
|
||||
|
||||
|
||||
<Project frameworkVersion="v3_5" name="OpenSim.Client.VWoHTTP" path="OpenSim/Client/VWoHTTP" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
|
@ -2023,45 +2022,6 @@
|
|||
</Files>
|
||||
</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 -->
|
||||
<Project frameworkVersion="v3_5" name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library">
|
||||
<Configuration name="Debug">
|
||||
|
|
Loading…
Reference in New Issue