diff --git a/OpenSim/Client/Linden/LLClientStackModule.cs b/OpenSim/Client/Linden/LLClientStackModule.cs
deleted file mode 100644
index f882d5d301..0000000000
--- a/OpenSim/Client/Linden/LLClientStackModule.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Linden UDP Stack Region Module
- ///
- public class LLClientStackModule : INonSharedRegionModule
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- #region IRegionModule Members
-
- ///
- /// Scene that contains the region's data
- ///
- 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
- }
-}
diff --git a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml b/OpenSim/Client/Linden/Resources/LindenModules.addin.xml
deleted file mode 100644
index af41e98cea..0000000000
--- a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 2dca3eb6a9..9d70acbeeb 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -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);
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
index 3c73095fc3..287c4dda7b 100644
--- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
@@ -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);
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 18a5733bda..5a6b265aad 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -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
///
- 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> 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()
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index dbb07817f6..c2f9c3ab7b 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -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);
}
///
@@ -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;
}
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 22ce88060c..c59fbca074 100755
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -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)
{
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index accf52ec44..a9a493d876 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -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)
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index cbab2dbc6a..b28ad69a5e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -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);
+ }
///
/// 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.
///
+ ///
protected void Notice(string msg)
{
if (m_console != null)
@@ -408,6 +419,19 @@ namespace OpenSim.Framework.Servers
m_console.Output(msg);
}
}
+
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ protected void Notice(string format, params string[] components)
+ {
+ if (m_console != null)
+ m_console.OutputFormat(format, components);
+ }
///
/// Enhance the version string with extra information if it's available.
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 86ad7aa693..d4ee7ba56d 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -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);
}
}
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 8d1671a885..d1d8736062 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -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
///
/// Created to work around a limitation in Mono with nested delegates
///
- 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 wrapper = FireAndForgetWrapper.Instance;
wrapper.FireAndForget(callback, obj);
break;
case FireAndForgetMethod.SmartThreadPool:
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index d88d09517f..d731ac5882 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -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;
///
/// Send LLSD to an HTTP client in application/llsd+json form
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e3b857351c..ed4b6203c7 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -283,10 +283,6 @@ namespace OpenSim
"kick user [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 ",
- "Set a config option", HandleConfig);
+ "config set ",
+ "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 ",
- "Read a config option", HandleConfig);
+ "config get [] []",
+ "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 ",
+ "Save current configuration to a file at the given path", HandleConfig);
m_console.Commands.AddCommand("region", false, "command-script",
"command-script