Merge branch 'master' into viewer-2-initial-appearance

viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2011-01-28 18:22:39 +00:00
commit f7104dda44
84 changed files with 1634 additions and 914 deletions

View File

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

View File

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

View File

@ -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);

View File

@ -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);

View File

@ -427,19 +427,30 @@ 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
if ((attachpoint & 0x80) > 0)
{
@ -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()

View File

@ -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;
}

View File

@ -75,6 +75,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)
{

View File

@ -697,6 +697,8 @@ namespace OpenSim.Framework
landData._mediaLoop = _mediaLoop;
landData._obscureMusic = _obscureMusic;
landData._obscureMedia = _obscureMedia;
landData._simwideArea = _simwideArea;
landData._simwidePrims = _simwidePrims;
landData._parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)

View File

@ -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,18 +388,30 @@ 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)
@ -408,6 +419,19 @@ namespace OpenSim.Framework.Servers
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>
/// <param name="format"></param>
/// <param name="components"></param>
protected void Notice(string format, params string[] components)
{
if (m_console != null)
m_console.OutputFormat(format, components);
}
/// <summary>
/// Enhance the version string with extra information if it's available.

View File

@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer
// Every month or so this will wrap and give bad numbers, not really a problem
// 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);
}
}

View File

@ -46,7 +46,7 @@ using System.Threading;
using log4net;
using Nini.Config;
using Nwc.XmlRpc;
using BclExtras;
// using BclExtras;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using Amib.Threading;
@ -1375,8 +1375,29 @@ namespace OpenSim.Framework
/// <summary>
/// Created to work around a limitation in Mono with nested delegates
/// </summary>
private class FireAndForgetWrapper
private sealed class FireAndForgetWrapper
{
private static volatile FireAndForgetWrapper instance;
private static object syncRoot = new Object();
public static FireAndForgetWrapper Instance {
get {
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
{
instance = new FireAndForgetWrapper();
}
}
}
return instance;
}
}
public void FireAndForget(System.Threading.WaitCallback callback)
{
callback.BeginInvoke(null, EndFireAndForget, callback);
@ -1445,7 +1466,7 @@ namespace OpenSim.Framework
ThreadPool.QueueUserWorkItem(callback, obj);
break;
case FireAndForgetMethod.BeginInvoke:
FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>();
FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance;
wrapper.FireAndForget(callback, obj);
break;
case FireAndForgetMethod.SmartThreadPool:

View File

@ -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

View File

@ -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",
@ -305,13 +301,6 @@ namespace OpenSim
m_console.Commands.AddCommand("region", false, "show regions",
"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",
@ -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,48 +600,68 @@ 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));
}
else
{
IConfig c = m_config.Source.Configs[cmdparams[1]];
if (c == null)
foreach (IConfig config in m_config.Source.Configs)
{
MainConsole.Instance.Output(String.Format("Section \"{0}\" does not exist.",cmdparams[1]));
Notice("[{0}]", config.Name);
string[] keys = config.GetKeys();
foreach (string key in keys)
Notice(" {0} = {1}", key, config.GetString(key));
}
}
else if (cmdparams.Length == 2 || cmdparams.Length == 3)
{
IConfig config = m_config.Source.Configs[cmdparams[1]];
if (config == null)
{
Notice("Section \"{0}\" does not exist.",cmdparams[1]);
break;
}
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;
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>
@ -1146,7 +1061,7 @@ namespace OpenSim
MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
}
}
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset);
}
else
{

View File

@ -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();
ani.AnimationSourceList[i].ObjectID = objectIDs[i];
if (objectIDs[i] == UUID.Zero)
ani.AnimationSourceList[i].ObjectID = sourceAgentId;
if (objectIDs[i].Equals(sourceAgentId))
ani.AnimationSourceList[i].ObjectID = UUID.Zero;
else
ani.AnimationSourceList[i].ObjectID = objectIDs[i];
}
ani.Header.Reliable = false;
OutPacket(ani, ThrottleOutPacketType.Task);
@ -4331,7 +4333,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.SequenceID = sequence_id;
if (landData.SimwideArea > 0)
{
updateMessage.SimWideMaxPrims = parcelObjectCapacity;
int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus);
updateMessage.SimWideMaxPrims = simulatorCapacity;
}
else
{

View File

@ -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()

View File

@ -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))

View File

@ -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,46 +141,31 @@ 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;
}
}
}
while (m_pendingAdds.TryDequeue(out pendingAdd))
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))
{
while (m_pendingRemoves.TryDequeue(out pendingRemove))
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
{
if (m_pendingRemoves != null && m_packets != null)
m_packets.Remove(pendingRemove.SequenceNumber);
// Update stats
Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
if (!pendingRemove.FromResend)
{
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);
if (!pendingRemove.FromResend)
{
// Calculate the round-trip time for this packet and its ACK
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
if (rtt > 0)
ackedPacket.Client.UpdateRoundTrip(rtt);
}
}
// Calculate the round-trip time for this packet and its ACK
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
if (rtt > 0)
ackedPacket.Client.UpdateRoundTrip(rtt);
}
}
}
}
}
}
}

View File

@ -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;

View File

@ -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)

View File

@ -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();

View File

@ -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",

View File

@ -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();

View File

@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
}
}
m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId);
m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId);
// If we only found default textures, then the appearance is not cached
return (defonly ? false : true);
@ -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
@ -210,14 +210,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{
changed = sp.Appearance.SetTextureEntries(textureEntry) || changed;
m_log.InfoFormat("[AVFACTORY]: received texture update for {0}",client.AgentId);
m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", client.AgentId);
Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); });
// This appears to be set only in the final stage of the appearance
// update transaction. In theory, we should be able to do an immediate
// appearance send and save here.
QueueAppearanceSave(client.AgentId);
// save only if there were changes, send no matter what (doesn't hurt to send twice)
if (changed)
QueueAppearanceSave(client.AgentId);
QueueAppearanceSend(client.AgentId);
}

View File

@ -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
@ -93,4 +93,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
"[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name);
}
}
}
}

View File

@ -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;

View File

@ -139,6 +139,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving item {0} with asset {1}", inventoryItem.ID, inventoryItem.AssetID);
string filename = path + CreateArchiveItemName(inventoryItem);
// Record the creator of this item for user record purposes (which might go away soon)
@ -162,6 +165,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself,
Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving folder {0}", inventoryFolder.Name);
if (saveThisFolderItself)
{
path += CreateArchiveFolderName(inventoryFolder);

View File

@ -122,12 +122,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand(
this, "save iar",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>]",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>] [--v|-verbose]",
"Save user inventory archive (IAR).",
"<first> is the user's first name." + Environment.NewLine
+ "<last> is the user's last name." + Environment.NewLine
+ "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
+ "<IAR path> is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleSaveInvConsoleCommand);
@ -394,6 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
List<string> mainParams = ops.Parse(cmdparams);

View File

@ -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 + "/",

View File

@ -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);
@ -374,4 +371,4 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
return String.Format("<binary encoding=\"base64\">{0}</binary>", Convert.ToBase64String(resultbytes));
}
}
}
}

View File

@ -53,6 +53,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected bool m_Enabled = false;
protected Scene m_aScene;
protected List<UUID> m_agentsInTransit;
private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions =
new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>();
#region ISharedRegionModule
@ -281,6 +284,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
{
sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
return;
}
sp.ControllingClient.SendTeleportStart(teleportFlags);
// the avatar.Close below will clear the child region list. We need this below for (possibly)
@ -575,7 +584,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
#region Agent Crossings
public void Cross(ScenePresence agent, bool isFlying)
public bool Cross(ScenePresence agent, bool isFlying)
{
Scene scene = agent.Scene;
Vector3 pos = agent.AbsolutePosition;
@ -611,6 +620,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
else
{
agent.InTransit();
neighboury = b.TriggerRegionY;
neighbourx = b.TriggerRegionX;
@ -620,7 +631,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return;
return true;
}
}
@ -632,6 +643,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
else
{
agent.InTransit();
neighboury = ba.TriggerRegionY;
neighbourx = ba.TriggerRegionX;
@ -644,7 +657,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return;
return true;
}
}
@ -664,6 +677,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
else
{
agent.InTransit();
neighboury = ba.TriggerRegionY;
neighbourx = ba.TriggerRegionX;
Vector3 newposition = pos;
@ -672,7 +687,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return;
return true;
}
}
else if (scene.TestBorderCross(pos + northCross, Cardinals.N))
@ -694,6 +709,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
else
{
agent.InTransit();
neighboury = b.TriggerRegionY;
neighbourx = b.TriggerRegionX;
Vector3 newposition = pos;
@ -702,7 +719,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return;
return true;
}
}
else if (scene.TestBorderCross(pos + northCross, Cardinals.N))
@ -738,9 +755,52 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
*/
CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d);
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
int x = (int)(neighbourx * Constants.RegionSize), y = (int)(neighboury * Constants.RegionSize);
ExpiringCache<ulong, DateTime> r;
DateTime banUntil;
if (m_bannedRegions.TryGetValue(agent.ControllingClient.AgentId, out r))
{
if (r.TryGetValue(neighbourHandle, out banUntil))
{
if (DateTime.Now < banUntil)
return false;
r.Remove(neighbourHandle);
}
}
else
{
r = null;
}
GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
{
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
if (r == null)
{
r = new ExpiringCache<ulong, DateTime>();
r.Add(neighbourHandle, DateTime.Now + TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(15));
m_bannedRegions.Add(agent.ControllingClient.AgentId, r, TimeSpan.FromSeconds(45));
}
else
{
r.Add(neighbourHandle, DateTime.Now + TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(15));
}
return false;
}
agent.InTransit();
CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, CrossAgentToNewRegionCompleted, d);
return true;
}
@ -751,7 +811,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
private void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene)
{
// This assumes that we know what our neighbors are.
// This assumes that we know what our neighbours are.
InformClientToInitateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
d.BeginInvoke(agent, regionX, regionY, position, initiatingScene,
@ -795,21 +855,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
icon.EndInvoke(iar);
}
public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying);
public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying);
/// <summary>
/// This Closes child agents on neighboring regions
/// This Closes child agents on neighbouring regions
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
/// </summary>
protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying)
protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying)
{
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} to {2}-{3}", agent.Firstname, agent.Lastname, neighbourx, neighboury);
Scene m_scene = agent.Scene;
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
int x = (int)(neighbourx * Constants.RegionSize), y = (int)(neighboury * Constants.RegionSize);
GridRegion neighbourRegion = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
if (neighbourRegion != null && agent.ValidateAttachments())
{
@ -920,7 +978,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
#region Enable Child Agent
/// <summary>
/// This informs a single neighboring region about agent "avatar".
/// This informs a single neighbouring region about agent "avatar".
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
/// </summary>
public void EnableChildAgent(ScenePresence sp, GridRegion region)
@ -977,7 +1035,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
ScenePresence avatar, AgentCircuitData a, GridRegion reg, IPEndPoint endPoint, bool newAgent);
/// <summary>
/// This informs all neighboring regions about agent "avatar".
/// This informs all neighbouring regions about agent "avatar".
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
/// </summary>
public void EnableChildAgents(ScenePresence sp)
@ -1108,7 +1166,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
catch (ArgumentOutOfRangeException)
{
m_log.ErrorFormat(
"[ENTITY TRANSFER MODULE]: Neighbour Regions response included the current region in the neighbor list. The following region will not display to the client: {0} for region {1} ({2}, {3}).",
"[ENTITY TRANSFER MODULE]: Neighbour Regions response included the current region in the neighbour list. The following region will not display to the client: {0} for region {1} ({2}, {3}).",
neighbour.ExternalHostName,
neighbour.RegionHandle,
neighbour.RegionLocX,
@ -1188,7 +1246,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
#endregion
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbor region {2} @ {3} " +
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " +
"and EstablishAgentCommunication with seed cap {4}",
m_scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath);

View File

@ -434,10 +434,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask;
// Magic number badness. Maybe this deserves an enum.
// bit 4 (16) is the "Slam" bit, it means treat as passed
// and apply next owner perms on rez
item.CurrentPermissions |= 16; // Slam!
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
else
{
@ -640,8 +637,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
rootPart.Name = item.Name;
rootPart.Description = item.Description;
if ((item.Flags & (uint)InventoryItemFlags.ObjectSlamSale) != 0)
{
rootPart.ObjectSaleType = item.SaleType;
rootPart.SalePrice = item.SalePrice;
}
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0)
if ((rootPart.OwnerID != item.Owner) ||
(item.CurrentPermissions & 16) != 0 || // Magic number
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
{
//Need to kill the for sale here
rootPart.ObjectSaleType = 0;
@ -651,9 +656,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{
foreach (SceneObjectPart part in group.Parts)
{
part.EveryoneMask = item.EveryOnePermissions;
part.NextOwnerMask = item.NextPermissions;
part.GroupMask = 0; // DO NOT propagate here
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
group.ApplyNextOwnerPermissions();
@ -669,8 +677,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
part.Inventory.ChangeInventoryOwner(item.Owner);
part.GroupMask = 0; // DO NOT propagate here
}
part.EveryoneMask = item.EveryOnePermissions;
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
rootPart.TrimPermissions();

View File

@ -257,18 +257,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
public bool QueryAccess(GridRegion destination, UUID id)
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
{
if (destination == null)
return false;
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == destination.RegionHandle)
{
//m_log.Debug("[LOCAL COMMS]: Found region to send QueryAccess");
return s.QueryAccess(id);
}
if (s.RegionInfo.RegionID == destination.RegionID)
return s.QueryAccess(id, position);
}
//m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
return false;

View File

@ -239,18 +239,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
}
public bool QueryAccess(GridRegion destination, UUID id)
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
{
if (destination == null)
return false;
// Try local first
if (m_localBackend.QueryAccess(destination, id))
if (m_localBackend.QueryAccess(destination, id, position))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
return m_remoteConnector.QueryAccess(destination, id);
return m_remoteConnector.QueryAccess(destination, id, position);
return false;

View File

@ -217,22 +217,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_scene.DeleteAllSceneObjects();
}
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
// otherwise, use the master avatar uuid instead
LoadParcels(serialisedParcels);
LoadObjects(serialisedSceneObjects);
// Reload serialized parcels
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
List<LandData> landData = new List<LandData>();
foreach (string serialisedParcel in serialisedParcels)
{
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
if (!ResolveUserUuid(parcel.OwnerID))
parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
landData.Add(parcel);
}
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
}
/// <summary>
/// Load serialized scene objects.
/// </summary>
/// <param name="serialisedSceneObjects"></param>
protected void LoadObjects(List<string> serialisedSceneObjects)
{
// Reload serialized prims
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
@ -262,6 +260,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// to the same scene (when this is possible).
sceneObject.ResetIDs();
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
// or creator data is present. Otherwise, use the estate owner instead.
foreach (SceneObjectPart part in sceneObject.Parts)
{
if (part.CreatorData == null || part.CreatorData == string.Empty)
@ -318,11 +318,36 @@ namespace OpenSim.Region.CoreModules.World.Archiver
int ignoredObjects = serialisedSceneObjects.Count - sceneObjectsLoadedCount;
if (ignoredObjects > 0)
m_log.WarnFormat("[ARCHIVER]: Ignored {0} scene objects that already existed in the scene", ignoredObjects);
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
m_log.WarnFormat("[ARCHIVER]: Ignored {0} scene objects that already existed in the scene", ignoredObjects);
}
/// <summary>
/// Load serialized parcels.
/// </summary>
/// <param name="serialisedParcels"></param>
protected void LoadParcels(List<string> serialisedParcels)
{
// Reload serialized parcels
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
List<LandData> landData = new List<LandData>();
foreach (string serialisedParcel in serialisedParcels)
{
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
if (!ResolveUserUuid(parcel.OwnerID))
parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
// m_log.DebugFormat(
// "[ARCHIVER]: Adding parcel {0}, local id {1}, area {2}",
// parcel.Name, parcel.LocalID, parcel.Area);
landData.Add(parcel);
}
if (!m_merge)
m_scene.LandChannel.Clear(false);
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
}
/// <summary>

View File

@ -249,14 +249,18 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (asset != null)
{
// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id);
if (m_options.ContainsKey("verbose"))
m_log.InfoFormat("[ARCHIVER]: Writing asset {0}", id);
m_foundAssetUuids.Add(asset.FullID);
m_assetsArchiver.WriteAsset(PostProcess(asset));
}
else
{
// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id);
if (m_options.ContainsKey("verbose"))
m_log.InfoFormat("[ARCHIVER]: Recording asset {0} as not found", id);
m_notFoundAssetUuids.Add(new UUID(id));
}

View File

@ -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

View File

@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.World.Land
#endregion
private readonly Scene m_scene;
private readonly LandManagementModule m_landManagementModule;
private readonly LandManagementModule m_landManagementModule;
public LandChannel(Scene scene, LandManagementModule landManagementMod)
{
@ -116,6 +116,12 @@ namespace OpenSim.Region.CoreModules.World.Land
return new List<ILandObject>();
}
public void Clear(bool setupDefaultParcel)
{
if (m_landManagementModule != null)
m_landManagementModule.Clear(setupDefaultParcel);
}
public List<ILandObject> ParcelsNearPoint(Vector3 position)
{

View File

@ -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 Caps=OpenSim.Framework.Capabilities.Caps;
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)
@ -148,6 +163,29 @@ namespace OpenSim.Region.CoreModules.World.Land
// reason = "You are not allowed to enter this sim.";
// 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)
{
@ -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
@ -270,13 +298,19 @@ namespace OpenSim.Region.CoreModules.World.Land
m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
m_landIDList.Initialize();
}
}
/// <summary>
/// Create a default parcel that spans the entire region and is owned by the estate owner.
/// </summary>
/// <returns>The parcel created.</returns>
protected ILandObject CreateDefaultParcel()
{
ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
AddLandObject(fullSimParcel);
return AddLandObject(fullSimParcel);
}
public List<ILandObject> AllParcels()
@ -549,15 +583,6 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
/// <summary>
/// Creates a basic Parcel object without an owner (a zeroed key)
/// </summary>
/// <returns></returns>
public ILandObject CreateBaseLand()
{
return new LandObject(UUID.Zero, false, m_scene);
}
/// <summary>
/// Adds a land object to the stored list and adds them to the landIDList to what they own
/// </summary>
@ -617,6 +642,28 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landList.Remove(local_id);
}
}
/// <summary>
/// Clear the scene of all parcels
/// </summary>
public void Clear(bool setupDefaultParcel)
{
lock (m_landList)
{
foreach (ILandObject lo in m_landList.Values)
{
//m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID);
m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID);
}
m_landList.Clear();
}
ResetSimLandObjects();
if (setupDefaultParcel)
CreateDefaultParcel();
}
private void performFinalLandJoin(ILandObject master, ILandObject slave)
{
@ -662,7 +709,7 @@ namespace OpenSim.Region.CoreModules.World.Land
int x;
int y;
if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
if (x_float >= Constants.RegionSize || x_float < 0 || y_float >= Constants.RegionSize || y_float < 0)
return null;
try
@ -704,10 +751,10 @@ namespace OpenSim.Region.CoreModules.World.Land
{
try
{
if (m_landList.ContainsKey(m_landIDList[x / 4, y / 4]))
//if (m_landList.ContainsKey(m_landIDList[x / 4, y / 4]))
return m_landList[m_landIDList[x / 4, y / 4]];
else
return null;
//else
// return null;
}
catch (IndexOutOfRangeException)
{
@ -1283,7 +1330,6 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
void ClientOnParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
{
ILandObject land;
@ -1299,10 +1345,8 @@ namespace OpenSim.Region.CoreModules.World.Land
{
land.DeedToGroup(groupID);
}
}
#region Land Object From Storage Functions
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
@ -1337,6 +1381,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnNoLandDataFromStorage()
{
ResetSimLandObjects();
CreateDefaultParcel();
}
#endregion
@ -1591,5 +1636,67 @@ namespace OpenSim.Region.CoreModules.World.Land
UpdateLandObject(localID, land.LandData);
}
protected void InstallInterfaces()
{
Command clearCommand
= new Command("clear", CommandIntentions.COMMAND_HAZARDOUS, ClearCommand, "Clears all the parcels from the region.");
Command showCommand
= new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowParcelsCommand, "Shows all parcels on the region.");
m_commander.RegisterCommand("clear", clearCommand);
m_commander.RegisterCommand("show", showCommand);
// Add this to our scene so scripts can call these functions
m_scene.RegisterModuleCommander(m_commander);
}
protected void ClearCommand(Object[] args)
{
string response = MainConsole.Instance.CmdPrompt(
string.Format(
"Are you sure that you want to clear all land parcels from {0} (y or n)",
m_scene.RegionInfo.RegionName),
"n");
if (response.ToLower() == "y")
{
Clear(true);
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName);
}
else
{
MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.RegionInfo.RegionName);
}
}
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,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
"Parcel Name",
"Local ID",
"Area",
"Starts",
"Ends",
"Owner");
lock (m_landList)
{
foreach (ILandObject lo in m_landList.Values)
{
LandData ld = lo.LandData;
report.AppendFormat(
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
}
}
MainConsole.Instance.Output(report.ToString());
}
}
}
}

View File

@ -66,6 +66,13 @@ namespace OpenSim.Region.CoreModules.World.Land
#region ILandObject Members
public int GetPrimsFree()
{
m_scene.EventManager.TriggerParcelPrimCountUpdate();
int free = GetSimulatorMaxPrimCount(this) - m_landData.SimwidePrims;
return free;
}
public LandData LandData
{
get { return m_landData; }
@ -77,7 +84,43 @@ 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)
@ -96,7 +139,7 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Member Functions
#region General Functions
/// <summary>
/// Checks to see if this land object contains a point
/// </summary>
@ -105,7 +148,7 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <returns>Returns true if the piece of land contains the specified point</returns>
public bool ContainsPoint(int x, int y)
{
if (x >= 0 && y >= 0 && x <= Constants.RegionSize && y <= Constants.RegionSize)
if (x >= 0 && y >= 0 && x < Constants.RegionSize && y < Constants.RegionSize)
{
return (LandBitmap[x / 4, y / 4] == true);
}
@ -147,7 +190,11 @@ namespace OpenSim.Region.CoreModules.World.Land
else
{
// Normal Calculations
return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus);
int parcelMax = (int)(((float)LandData.Area / 65536.0f)
* (float)m_scene.RegionInfo.ObjectCapacity
* (float)m_scene.RegionInfo.RegionSettings.ObjectBonus);
// TODO: The calculation of ObjectBonus should be refactored. It does still not work in the same manner as SL!
return parcelMax;
}
}
public int GetSimulatorMaxPrimCount(ILandObject thisObject)
@ -159,7 +206,9 @@ namespace OpenSim.Region.CoreModules.World.Land
else
{
//Normal Calculations
return m_scene.RegionInfo.ObjectCapacity;
int simMax = (int)(((float)LandData.SimwideArea / 65536.0f)
* (float)m_scene.RegionInfo.ObjectCapacity);
return simMax;
}
}
#endregion
@ -217,6 +266,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ParcelFlags.AllowDamage |
ParcelFlags.CreateObjects |
ParcelFlags.RestrictPushObject |
ParcelFlags.AllowOtherScripts |
ParcelFlags.AllowGroupScripts |
ParcelFlags.CreateGroupObjects |
ParcelFlags.AllowAPrimitiveEntry |
@ -332,7 +382,7 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.AuthBuyerID = UUID.Zero;
newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
m_scene.EventManager.TriggerParcelPrimCountUpdate();
SendLandUpdateToAvatarsOverMe(true);
}
@ -347,7 +397,7 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
m_scene.EventManager.TriggerParcelPrimCountUpdate();
SendLandUpdateToAvatarsOverMe(true);
}
@ -413,6 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client)
{
m_scene.EventManager.TriggerParcelPrimCountUpdate();
SendLandProperties(0, snap_selection, 0, remote_client);
}

View File

@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
part.NextOwnerMask;
item.GroupPermissions = part.GroupMask &
part.NextOwnerMask;
item.CurrentPermissions |= 16; // Slam!
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
item.CreationDate = Util.UnixTimeSinceEpoch();
if (m_scene.AddInventoryItem(item))

View File

@ -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);
// }
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Interfaces
void TeleportHome(UUID id, IClientAPI client);
void Cross(ScenePresence agent, bool isFlying);
bool Cross(ScenePresence agent, bool isFlying);
void AgentArrivedAtDestination(UUID agent);

View File

@ -69,6 +69,14 @@ namespace OpenSim.Region.Framework.Interfaces
/// <returns></returns>
ILandObject GetLandObject(int localID);
/// <summary>
/// Clear the land channel of all parcels.
/// </summary>
/// <param name="setupDefaultParcel">
/// If true, set up a default parcel covering the whole region owned by the estate owner.
/// </param>
void Clear(bool setupDefaultParcel);
bool IsLandPrimCountTainted();
bool IsForcefulBansAllowed();
void UpdateLandObject(int localID, LandData data);

View File

@ -39,11 +39,26 @@ namespace OpenSim.Region.Framework.Interfaces
{
int GetParcelMaxPrimCount(ILandObject thisObject);
int GetSimulatorMaxPrimCount(ILandObject thisObject);
int GetPrimsFree();
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();

View File

@ -328,8 +328,14 @@ namespace OpenSim.Region.Framework.Scenes
{
item.Name = itemUpd.Name;
item.Description = itemUpd.Description;
if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions))
item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
if (item.EveryOnePermissions != (itemUpd.EveryOnePermissions & item.BasePermissions))
item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone;
item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions;
if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions))
item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup;
item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions;
item.GroupID = itemUpd.GroupID;
item.GroupOwned = itemUpd.GroupOwned;
@ -344,9 +350,12 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: Check if folder changed and move item
//item.NextPermissions = itemUpd.Folder;
item.InvType = itemUpd.InvType;
if (item.SalePrice != itemUpd.SalePrice ||
item.SaleType != itemUpd.SaleType)
item.Flags |= (uint)InventoryItemFlags.ObjectSlamSale;
item.SalePrice = itemUpd.SalePrice;
item.SaleType = itemUpd.SaleType;
item.Flags = itemUpd.Flags;
InventoryService.UpdateItem(item);
}
@ -527,7 +536,8 @@ namespace OpenSim.Region.Framework.Scenes
// Assign to the actual item. Make sure the slam bit is
// set, if it wasn't set before.
itemCopy.BasePermissions = basePerms;
itemCopy.CurrentPermissions = ownerPerms | 16; // Slam
itemCopy.CurrentPermissions = ownerPerms;
itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
itemCopy.NextPermissions = item.NextPermissions;
@ -1043,7 +1053,7 @@ namespace OpenSim.Region.Framework.Scenes
else
agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
agentItem.CurrentPermissions |= 16; // Slam
agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
agentItem.NextPermissions = taskItem.NextPermissions;
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
@ -1254,7 +1264,7 @@ namespace OpenSim.Region.Framework.Scenes
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
destTaskItem.CurrentPermissions |= 16; // Slam!
destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
}
@ -1435,6 +1445,8 @@ namespace OpenSim.Region.Framework.Scenes
// Base ALWAYS has move
currentItem.BasePermissions |= (uint)PermissionMask.Move;
itemInfo.Flags = currentItem.Flags;
// Check if we're allowed to mess with permissions
if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god
{
@ -1452,6 +1464,14 @@ namespace OpenSim.Region.Framework.Scenes
// Owner can't change base, and can change other
// only up to base
itemInfo.BasePermissions = currentItem.BasePermissions;
if (itemInfo.EveryonePermissions != currentItem.EveryonePermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone;
if (itemInfo.GroupPermissions != currentItem.GroupPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup;
if (itemInfo.CurrentPermissions != currentItem.CurrentPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteOwner;
if (itemInfo.NextPermissions != currentItem.NextPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
itemInfo.EveryonePermissions &= currentItem.BasePermissions;
itemInfo.GroupPermissions &= currentItem.BasePermissions;
itemInfo.CurrentPermissions &= currentItem.BasePermissions;
@ -1459,6 +1479,19 @@ namespace OpenSim.Region.Framework.Scenes
}
}
else
{
if (itemInfo.BasePermissions != currentItem.BasePermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteBase;
if (itemInfo.EveryonePermissions != currentItem.EveryonePermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone;
if (itemInfo.GroupPermissions != currentItem.GroupPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup;
if (itemInfo.CurrentPermissions != currentItem.CurrentPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteOwner;
if (itemInfo.NextPermissions != currentItem.NextPermissions)
itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
}
// Next ALWAYS has move
itemInfo.NextPermissions |= (uint)PermissionMask.Move;
@ -1667,7 +1700,7 @@ namespace OpenSim.Region.Framework.Scenes
srcTaskItem.NextPermissions;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
srcTaskItem.NextPermissions;
destTaskItem.CurrentPermissions |= 16; // Slam!
destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
}
@ -2131,5 +2164,15 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.LinkObjects(root, children);
}
private string PermissionString(uint permissions)
{
PermissionMask perms = (PermissionMask)permissions &
(PermissionMask.Move |
PermissionMask.Copy |
PermissionMask.Transfer |
PermissionMask.Modify);
return perms.ToString();
}
}
}

View File

@ -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,56 +2477,26 @@ namespace OpenSim.Region.Framework.Scenes
(aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
CheckHeartbeat();
ScenePresence presence;
if (m_restorePresences.ContainsKey(client.AgentId))
if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here
{
m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
m_clientManager.Add(client);
SubscribeToClientEvents(client);
presence = m_restorePresences[client.AgentId];
m_restorePresences.Remove(client.AgentId);
ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance);
m_eventManager.TriggerOnNewPresence(sp);
// 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;
sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags;
presence.initializeScenePresence(client, RegionInfo, this);
m_sceneGraph.AddScenePresence(presence);
lock (m_restorePresences)
// 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.child == false)
{
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);
m_clientManager.Add(client);
SubscribeToClientEvents(client);
ScenePresence sp = CreateAndAddScenePresence(client);
if (aCircuit != null)
sp.Appearance = aCircuit.Appearance;
// 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))
{
sp.IsChildAgent = false;
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
}
sp.IsChildAgent = false;
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
}
}
@ -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(
@ -3912,14 +3861,16 @@ namespace OpenSim.Region.Framework.Scenes
RequestTeleportLocation(remoteClient, info.RegionHandle, position, Vector3.Zero, (uint)(TPFlags.SetLastToTarget | TPFlags.ViaLandmark));
}
public void CrossAgentToNewRegion(ScenePresence agent, bool isFlying)
public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying)
{
if (m_teleportModule != null)
m_teleportModule.Cross(agent, isFlying);
return m_teleportModule.Cross(agent, isFlying);
else
{
m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule");
}
return false;
}
public void SendOutChildAgentUpdates(AgentPosition cadu, ScenePresence presence)
@ -4970,7 +4921,7 @@ namespace OpenSim.Region.Framework.Scenes
// from logging into the region, teleporting into the region
// or corssing the broder walking, but will NOT prevent
// child agent creation, thereby emulating the SL behavior.
public bool QueryAccess(UUID agentID)
public bool QueryAccess(UUID agentID, Vector3 position)
{
return true;
}

View File

@ -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)

View File

@ -122,7 +122,7 @@ namespace OpenSim.Region.Framework.Scenes
taskItem.NextPermissions = item.NextPermissions;
// We're adding this to a prim we don't own. Force
// owner change
taskItem.CurrentPermissions |= 16; // Slam
taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
else
{

View File

@ -178,6 +178,8 @@ namespace OpenSim.Region.Framework.Scenes
{
item.LastOwnerID = item.OwnerID;
item.OwnerID = ownerId;
item.PermsMask = 0;
item.PermsGranter = UUID.Zero;
}
}
}
@ -629,14 +631,19 @@ namespace OpenSim.Region.Framework.Scenes
group.SetGroup(m_part.GroupID, null);
if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0)
// TODO: Remove magic number badness
if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
{
if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions())
{
foreach (SceneObjectPart part in partList)
{
part.EveryoneMask = item.EveryonePermissions;
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryonePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
group.ApplyNextOwnerPermissions();
@ -645,15 +652,20 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectPart part in partList)
{
if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0)
// TODO: Remove magic number badness
if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = item.OwnerID;
part.Inventory.ChangeInventoryOwner(item.OwnerID);
}
part.EveryoneMask = item.EveryonePermissions;
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryonePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
rootPart.TrimPermissions();
@ -685,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.
@ -840,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
{
@ -946,6 +957,13 @@ namespace OpenSim.Region.Framework.Scenes
{
foreach (TaskInventoryItem item in m_items.Values)
{
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
mask &= ~((uint)PermissionMask.Copy >> 13);
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
mask &= ~((uint)PermissionMask.Transfer >> 13);
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0)
mask &= ~((uint)PermissionMask.Modify >> 13);
if (item.InvType != (int)InventoryType.Object)
{
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
@ -996,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;
}
}
}
@ -1010,6 +1030,8 @@ namespace OpenSim.Region.Framework.Scenes
item.BasePermissions = perms;
}
}
m_inventorySerial++;
HasInventoryChanged = true;
}
public bool ContainsScripts()

View File

@ -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>
@ -2718,29 +2725,57 @@ namespace OpenSim.Region.Framework.Scenes
// Makes sure avatar does not end up outside region
if (neighbor <= 0)
{
if (!needsTransit)
if (needsTransit)
{
if (m_requestedSitTargetUUID == UUID.Zero)
{
bool isFlying = m_physicsActor.Flying;
RemoveFromPhysicalScene();
Vector3 pos = AbsolutePosition;
if (AbsolutePosition.X < 0)
pos.X += Velocity.X;
pos.X += Velocity.X * 2;
else if (AbsolutePosition.X > Constants.RegionSize)
pos.X -= Velocity.X;
pos.X -= Velocity.X * 2;
if (AbsolutePosition.Y < 0)
pos.Y += Velocity.Y;
pos.Y += Velocity.Y * 2;
else if (AbsolutePosition.Y > Constants.RegionSize)
pos.Y -= Velocity.Y;
pos.Y -= Velocity.Y * 2;
Velocity = Vector3.Zero;
AbsolutePosition = pos;
AddToPhysicalScene(isFlying);
}
}
}
else if (neighbor > 0)
CrossToNewRegion();
{
if (!CrossToNewRegion())
{
if (m_requestedSitTargetUUID == UUID.Zero)
{
bool isFlying = m_physicsActor.Flying;
RemoveFromPhysicalScene();
Vector3 pos = AbsolutePosition;
if (AbsolutePosition.X < 0)
pos.X += Velocity.X * 2;
else if (AbsolutePosition.X > Constants.RegionSize)
pos.X -= Velocity.X * 2;
if (AbsolutePosition.Y < 0)
pos.Y += Velocity.Y * 2;
else if (AbsolutePosition.Y > Constants.RegionSize)
pos.Y -= Velocity.Y * 2;
Velocity = Vector3.Zero;
AbsolutePosition = pos;
AddToPhysicalScene(isFlying);
}
}
}
}
else
{
RemoveFromPhysicalScene();
// This constant has been inferred from experimentation
// I'm not sure what this value should be, so I tried a few values.
timeStep = 0.04f;
@ -2789,16 +2824,15 @@ namespace OpenSim.Region.Framework.Scenes
/// If the neighbor accepts, remove the agent's viewable avatar from this scene
/// set them to a child agent.
/// </summary>
protected void CrossToNewRegion()
protected bool CrossToNewRegion()
{
InTransit();
try
{
m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
return m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
}
catch
{
m_scene.CrossAgentToNewRegion(this, false);
return m_scene.CrossAgentToNewRegion(this, false);
}
}
@ -2952,10 +2986,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;

View File

@ -1441,6 +1441,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
{
TaskInventoryDictionary tinv = new TaskInventoryDictionary();
if (reader.IsEmptyElement)
{
reader.Read();
return tinv;
}
reader.ReadStartElement(name, String.Empty);
while (reader.Name == "TaskInventoryItem")
@ -1474,6 +1480,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
{
PrimitiveBaseShape shape = new PrimitiveBaseShape();
if (reader.IsEmptyElement)
{
reader.Read();
return shape;
}
reader.ReadStartElement(name, String.Empty); // Shape
string nodeName = string.Empty;

View File

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

View File

@ -62,6 +62,11 @@ public class RegionCombinerLargeLandChannel : ILandChannel
{
return RootRegionLandChannel.AllParcels();
}
public void Clear(bool setupDefaultParcel)
{
RootRegionLandChannel.Clear(setupDefaultParcel);
}
public ILandObject GetLandObject(int x, int y)
{

View File

@ -558,7 +558,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
else if (m_data[itemIndex] is Int32)
return new LSLInteger((int)m_data[itemIndex]);
else if (m_data[itemIndex] is LSL_Types.LSLString)
return new LSLInteger((string)m_data[itemIndex]);
return new LSLInteger(m_data[itemIndex].ToString());
else
throw new InvalidCastException();
}

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -215,13 +215,22 @@ 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)
string xff = "X-Forwarded-For";
if (headers.ContainsKey(xff.ToLower()))
xff = xff.ToLower();
if (!headers.ContainsKey(xff) || headers[xff] == null)
{
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]);
if (ep != null)
return ep.Address.ToString();
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);
}

View File

@ -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;

View File

@ -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"];

View File

@ -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();

View File

@ -200,13 +200,22 @@ 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)
string xff = "X-Forwarded-For";
if (headers.ContainsKey(xff.ToLower()))
xff = xff.ToLower();
if (!headers.ContainsKey(xff) || headers[xff] == null)
{
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]);
if (ep != null)
return ep.Address.ToString();
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);
}
@ -317,10 +326,17 @@ namespace OpenSim.Server.Handlers.Simulation
return;
}
// m_log.DebugFormat("[AGENT HANDLER]: Received QUERYACCESS with {0}", (string)request["body"]);
OSDMap args = Utils.GetOSDMap((string)request["body"]);
Vector3 position = Vector3.Zero;
if (args.ContainsKey("position"))
position = Vector3.Parse(args["position"].AsString());
GridRegion destination = new GridRegion();
destination.RegionID = regionID;
bool result = m_SimulationService.QueryAccess(destination, id);
bool result = m_SimulationService.QueryAccess(destination, id, position);
responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = result.ToString();

View File

@ -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)

View File

@ -0,0 +1,261 @@
/*
* 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.Net;
using System.IO;
using System.Timers;
using System.Drawing;
using System.Drawing.Imaging;
using log4net;
using Mono.Addins;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Region.OptionalModules.Simian
{
/// <summary>
/// </summary>
/// <remarks>
/// </remarks>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianGridMaptile")]
public class SimianGridMaptile : ISharedRegionModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool m_enabled = false;
private string m_serverUrl = String.Empty;
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
private int m_refreshtime = 0;
private int m_lastrefresh = 0;
private System.Timers.Timer m_refreshTimer = new System.Timers.Timer();
#region ISharedRegionModule
public Type ReplaceableInterface { get { return null; } }
public string Name { get { return "SimianGridMaptile"; } }
public void RegionLoaded(Scene scene) { }
public void Close() { }
///<summary>
///
///</summary>
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs["SimianGridMaptiles"];
if (config == null)
return;
if (! config.GetBoolean("Enabled", false))
return;
m_serverUrl = config.GetString("MaptileURL");
if (String.IsNullOrEmpty(m_serverUrl))
return;
m_refreshtime = Convert.ToInt32(config.GetString("RefreshTime"));
if (m_refreshtime <= 0)
return;
m_log.InfoFormat("[SIMIAN MAPTILE] enabled with refresh timeout {0} and URL {1}",
m_refreshtime,m_serverUrl);
m_enabled = true;
}
///<summary>
///
///</summary>
public void PostInitialise()
{
if (m_enabled)
{
m_refreshTimer.Enabled = true;
m_refreshTimer.AutoReset = true;
m_refreshTimer.Interval = 5 * 60 * 1000; // every 5 minutes
m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh);
}
}
///<summary>
///
///</summary>
public void AddRegion(Scene scene)
{
if (! m_enabled)
return;
// Every shared region module has to maintain an indepedent list of
// currently running regions
lock (m_scenes)
m_scenes[scene.RegionInfo.RegionID] = scene;
}
///<summary>
///
///</summary>
public void RemoveRegion(Scene scene)
{
if (! m_enabled)
return;
lock (m_scenes)
m_scenes.Remove(scene.RegionInfo.RegionID);
}
#endregion ISharedRegionModule
///<summary>
///
///</summary>
private void HandleMaptileRefresh(object sender, EventArgs ea)
{
// this approach is a bit convoluted becase we want to wait for the
// first upload to happen on startup but after all the objects are
// loaded and initialized
if (m_lastrefresh > 0 && Util.EnvironmentTickCountSubtract(m_lastrefresh) < m_refreshtime)
return;
m_log.DebugFormat("[SIMIAN MAPTILE] map refresh fired");
lock (m_scenes)
{
foreach (IScene scene in m_scenes.Values)
{
try
{
UploadMapTile(scene);
}
catch (Exception ex)
{
m_log.WarnFormat("[SIMIAN MAPTILE] something bad happened {0}",ex.Message);
}
}
}
m_lastrefresh = Util.EnvironmentTickCount();
}
///<summary>
///
///</summary>
private void UploadMapTile(IScene scene)
{
m_log.DebugFormat("[SIMIAN MAPTILE]: upload maptile for {0}",scene.RegionInfo.RegionName);
// Create a PNG map tile and upload it to the AddMapTile API
byte[] pngData = Utils.EmptyBytes;
IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>();
if (tileGenerator == null)
{
m_log.Warn("[SIMIAN MAPTILE]: Cannot upload PNG map tile without an ImageGenerator");
return;
}
using (Image mapTile = tileGenerator.CreateMapTile())
{
using (MemoryStream stream = new MemoryStream())
{
mapTile.Save(stream, ImageFormat.Png);
pngData = stream.ToArray();
}
}
List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>()
{
new MultipartForm.Parameter("X", scene.RegionInfo.RegionLocX.ToString()),
new MultipartForm.Parameter("Y", scene.RegionInfo.RegionLocY.ToString()),
new MultipartForm.File("Tile", "tile.png", "image/png", pngData)
};
string errorMessage = null;
int tickstart = Util.EnvironmentTickCount();
// Make the remote storage request
try
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
request.Timeout = 20000;
request.ReadWriteTimeout = 5000;
using (HttpWebResponse response = MultipartForm.Post(request, postParameters))
{
using (Stream responseStream = response.GetResponseStream())
{
string responseStr = responseStream.GetStreamString();
OSD responseOSD = OSDParser.Deserialize(responseStr);
if (responseOSD.Type == OSDType.Map)
{
OSDMap responseMap = (OSDMap)responseOSD;
if (responseMap["Success"].AsBoolean())
return;
errorMessage = "Upload failed: " + responseMap["Message"].AsString();
}
else
{
errorMessage = "Response format was invalid:\n" + responseStr;
}
}
}
}
catch (WebException we)
{
errorMessage = we.Message;
if (we.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webResponse = (HttpWebResponse)we.Response;
errorMessage = String.Format("[{0}] {1}",
webResponse.StatusCode,webResponse.StatusDescription);
}
}
catch (Exception ex)
{
errorMessage = ex.Message;
}
finally
{
// This just dumps a warning for any operation that takes more than 100 ms
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
m_log.DebugFormat("[SIMIAN MAPTILE]: map tile uploaded in {0}ms",tickdiff);
}
m_log.WarnFormat("[SIMIAN MAPTILE]: Failed to store {0} byte tile for {1}: {2}",
pngData.Length, scene.RegionInfo.RegionName, errorMessage);
}
}
}

View File

@ -28,8 +28,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net;
using System.Reflection;
@ -58,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)
@ -95,20 +93,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
serviceUrl = serviceUrl + '/';
m_ServerURI = serviceUrl;
m_Enabled = true;
// m_Enabled = true;
}
#region IGridService
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
{
// Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
// Scene scene;
// if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
// UploadMapTile(scene);
// else
// m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
@ -184,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;
}
@ -380,83 +371,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
#endregion IGridService
private void UploadMapTile(IScene scene)
{
string errorMessage = null;
// Create a PNG map tile and upload it to the AddMapTile API
byte[] pngData = Utils.EmptyBytes;
IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>();
if (tileGenerator == null)
{
m_log.Warn("[SIMIAN GRID CONNECTOR]: Cannot upload PNG map tile without an IMapImageGenerator");
return;
}
using (Image mapTile = tileGenerator.CreateMapTile())
{
using (MemoryStream stream = new MemoryStream())
{
mapTile.Save(stream, ImageFormat.Png);
pngData = stream.ToArray();
}
}
List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>()
{
new MultipartForm.Parameter("X", scene.RegionInfo.RegionLocX.ToString()),
new MultipartForm.Parameter("Y", scene.RegionInfo.RegionLocY.ToString()),
new MultipartForm.File("Tile", "tile.png", "image/png", pngData)
};
// Make the remote storage request
try
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
HttpWebResponse response = MultipartForm.Post(request, postParameters);
using (Stream responseStream = response.GetResponseStream())
{
string responseStr = null;
try
{
responseStr = responseStream.GetStreamString();
OSD responseOSD = OSDParser.Deserialize(responseStr);
if (responseOSD.Type == OSDType.Map)
{
OSDMap responseMap = (OSDMap)responseOSD;
if (responseMap["Success"].AsBoolean())
m_log.Info("[SIMIAN GRID CONNECTOR]: Uploaded " + pngData.Length + " byte PNG map tile to AddMapTile");
else
errorMessage = "Upload failed: " + responseMap["Message"].AsString();
}
else
{
errorMessage = "Response format was invalid:\n" + responseStr;
}
}
catch (Exception ex)
{
if (!String.IsNullOrEmpty(responseStr))
errorMessage = "Failed to parse the response:\n" + responseStr;
else
errorMessage = "Failed to retrieve the response: " + ex.Message;
}
}
}
catch (WebException ex)
{
errorMessage = ex.Message;
}
if (!String.IsNullOrEmpty(errorMessage))
{
m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}",
pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' '));
}
}
private GridRegion GetNearestRegion(Vector3d position, bool onlyEnabled)
{
NameValueCollection requestArgs = new NameValueCollection

View File

@ -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;
}

View File

@ -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;

View File

@ -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())
@ -325,4 +325,4 @@ namespace OpenSim.Services.Connectors.SimianGrid
}
}
}
}
}

View File

@ -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;

View File

@ -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;

View File

@ -31,6 +31,7 @@ using System.IO;
using System.Net;
using System.Reflection;
using System.Text;
using System.Collections;
using OpenSim.Framework;
using OpenSim.Services.Interfaces;
@ -206,9 +207,9 @@ namespace OpenSim.Services.Connectors.Simulation
/// <summary>
/// </summary>
public bool QueryAccess(GridRegion destination, UUID id)
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
{
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start");
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
IPEndPoint ext = destination.ExternalEndPoint;
if (ext == null) return false;
@ -216,10 +217,26 @@ namespace OpenSim.Services.Connectors.Simulation
// Eventually, we want to use a caps url instead of the agentID
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
OSDMap request = new OSDMap();
request.Add("position", OSD.FromString(position.ToString()));
try
{
OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"QUERYACCESS",10000);
return result["Success"].AsBoolean();
OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
bool success = result["Success"].AsBoolean();
if (!success)
{
if (result.ContainsKey("Message"))
{
string message = result["Message"].AsString();
if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
{
m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored");
return true;
}
}
}
return success;
}
catch (Exception e)
{
@ -237,7 +254,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 +274,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 +320,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)
{

View File

@ -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)
{

View File

@ -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;

View File

@ -155,7 +155,7 @@ namespace OpenSim.Services.HypergridService
string myExternalIP = string.Empty;
string gridName = gatekeeper.ServerURI;
m_log.DebugFormat("[USER AGENT SERVICE]: m_grid - {0}, gn - {1}", m_GridName, gridName);
m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}", m_GridName, gridName);
if (m_GridName == gridName)
success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
@ -266,11 +266,13 @@ namespace OpenSim.Services.HypergridService
if (m_TravelingAgents.ContainsKey(sessionID))
{
m_log.DebugFormat("[USER AGENT SERVICE]: Comparing with login IP {0} and MyIP {1}",
m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress);
return m_TravelingAgents[sessionID].ClientIPAddress == reportedIP ||
bool result = m_TravelingAgents[sessionID].ClientIPAddress == reportedIP ||
m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed
m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {1}; result is {3}",
reportedIP, m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress, result);
return result;
}
return false;

View File

@ -60,7 +60,7 @@ namespace OpenSim.Services.Interfaces
bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
bool QueryAccess(GridRegion destination, UUID id);
bool QueryAccess(GridRegion destination, UUID id, Vector3 position);
/// <summary>
/// Message from receiving region to departing region, telling it got contacted by the client.

View File

@ -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();

View File

@ -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)

View File

@ -55,6 +55,11 @@ namespace OpenSim.Tests.Common.Mock
{
return new List<ILandObject>();
}
public void Clear(bool setupDefaultParcel)
{
// Intentionally blank since we don't save any parcel data in the test channel
}
protected ILandObject GetNoLand()
{

Binary file not shown.

View File

@ -1240,6 +1240,14 @@
; Enable media on a prim facilities
Enabled = true;
;;
;; If you are using a simian grid frontend you can enable
;; this module to upload tile images for the mapping fn
;;
[SimianGridMaptiles]
Enabled = False
MaptileURL = "http://www.mygrid.com/Grid/"
RefreshTime = 3600
;;
;; These are defaults that are overwritten below in [Architecture].

View File

@ -158,7 +158,6 @@
<Reference name="System.Data"/>
<Reference name="System.Drawing"/>
<Reference name="System.Web"/>
<Reference name="BclExtras35" path="../../bin/"/>
<Reference name="OpenMetaverseTypes" path="../../bin/"/>
<Reference name="OpenMetaverse" path="../../bin/"/>
<Reference name="OpenMetaverse.StructuredData" path="../../bin/"/>
@ -1440,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>
@ -1557,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/"/>
@ -1597,7 +1541,6 @@
<Reference name="OpenSim.Region.ClientStack"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Services.Interfaces"/>
<Reference name="BclExtras35" path="../../../../bin/"/>
<Reference name="XMLRPC" path="../../../../bin/"/>
<Reference name="Nini" path="../../../../bin/"/>
<Reference name="log4net" path="../../../../bin/"/>
@ -1609,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">
@ -1993,7 +1991,6 @@
</Files>
</Project>
<Project frameworkVersion="v3_5" name="OpenSim.Client.VWoHTTP" path="OpenSim/Client/VWoHTTP" type="Library">
<Configuration name="Debug">
<Options>
@ -2025,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">