diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 2ea6de547a..4cc2e2c9c3 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1414,8 +1414,6 @@ namespace OpenSim.Framework
void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes);
- void KillEndDone();
-
bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
void SendRebakeAvatarTextures(UUID textureID);
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ef6e2594c4..0db1329ad2 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -53,6 +53,8 @@ namespace OpenSim.Framework.Servers.HttpServer
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
+ public int DebugLevel { get; set; }
+
private volatile int NotSocketErrors = 0;
public volatile bool HTTPDRunning = false;
@@ -79,11 +81,6 @@ namespace OpenSim.Framework.Servers.HttpServer
private PollServiceRequestManager m_PollServiceManager;
- ///
- /// Control the printing of certain debug messages.
- ///
- public int DebugLevel { get; set; }
-
public uint SSLPort
{
get { return m_sslport; }
@@ -450,7 +447,7 @@ namespace OpenSim.Framework.Servers.HttpServer
if (TryGetStreamHandler(handlerKey, out requestHandler))
{
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}",
request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description);
@@ -531,7 +528,7 @@ namespace OpenSim.Framework.Servers.HttpServer
case null:
case "text/html":
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
@@ -543,7 +540,7 @@ namespace OpenSim.Framework.Servers.HttpServer
case "application/xml+llsd":
case "application/llsd+json":
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
@@ -564,7 +561,7 @@ namespace OpenSim.Framework.Servers.HttpServer
//m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler");
if (DoWeHaveALLSDHandler(request.RawUrl))
{
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
@@ -574,7 +571,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
else if (DoWeHaveAHTTPHandler(request.RawUrl))
{
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
@@ -583,8 +580,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
else
{
-
- if (DebugLevel >= 1)
+ if (DebugLevel >= 3)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}",
request.HttpMethod, request.Url.PathAndQuery);
@@ -786,15 +782,30 @@ namespace OpenSim.Framework.Servers.HttpServer
requestStream.Close();
//m_log.Debug(requestBody);
requestBody = requestBody.Replace("", "");
- string responseString = null;
+ string responseString = String.Empty;
XmlRpcRequest xmlRprcRequest = null;
try
{
xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody);
}
- catch (XmlException)
+ catch (XmlException e)
{
+ if (DebugLevel >= 1)
+ {
+ if (DebugLevel >= 2)
+ m_log.Warn(
+ string.Format(
+ "[BASE HTTP SERVER]: Got XMLRPC request with invalid XML from {0}. XML was '{1}'. Sending blank response. Exception ",
+ request.RemoteIPEndPoint, requestBody),
+ e);
+ else
+ {
+ m_log.WarnFormat(
+ "[BASE HTTP SERVER]: Got XMLRPC request with invalid XML from {0}, length {1}. Sending blank response.",
+ request.RemoteIPEndPoint, requestBody.Length);
+ }
+ }
}
if (xmlRprcRequest != null)
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index b8ab8d9b26..becbbc21b8 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using System.Collections.Generic;
using System.Reflection;
using System.Net;
@@ -38,44 +39,143 @@ namespace OpenSim.Framework.Servers
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static BaseHttpServer instance = null;
- private static Dictionary m_Servers =
- new Dictionary();
+ private static Dictionary m_Servers = new Dictionary();
+ ///
+ /// Control the printing of certain debug messages.
+ ///
+ ///
+ /// If DebugLevel >= 1, then short warnings are logged when receiving bad input data.
+ /// If DebugLevel >= 2, then long warnings are logged when receiving bad input data.
+ /// If DebugLevel >= 3, then short notices about all incoming non-poll HTTP requests are logged.
+ ///
+ public static int DebugLevel
+ {
+ get { return s_debugLevel; }
+ set
+ {
+ s_debugLevel = value;
+
+ lock (m_Servers)
+ foreach (BaseHttpServer server in m_Servers.Values)
+ server.DebugLevel = s_debugLevel;
+ }
+ }
+
+ private static int s_debugLevel;
+
+ ///
+ /// Set the main HTTP server instance.
+ ///
+ ///
+ /// This will be used to register all handlers that listen to the default port.
+ ///
+ ///
+ /// Thrown if the HTTP server has not already been registered via AddHttpServer()
+ ///
public static BaseHttpServer Instance
{
get { return instance; }
- set { instance = value; }
- }
-
- public static IHttpServer GetHttpServer(uint port)
- {
- return GetHttpServer(port,null);
+
+ set
+ {
+ lock (m_Servers)
+ if (!m_Servers.ContainsValue(value))
+ throw new Exception("HTTP server must already have been registered to be set as the main instance");
+
+ instance = value;
+ }
}
+ ///
+ /// Register an already started HTTP server to the collection of known servers.
+ ///
+ ///
public static void AddHttpServer(BaseHttpServer server)
{
- m_Servers.Add(server.Port, server);
+ lock (m_Servers)
+ {
+ if (m_Servers.ContainsKey(server.Port))
+ throw new Exception(string.Format("HTTP server for port {0} already exists.", server.Port));
+
+ m_Servers.Add(server.Port, server);
+ }
}
+ ///
+ /// Removes the http server listening on the given port.
+ ///
+ ///
+ /// It is the responsibility of the caller to do clean up.
+ ///
+ ///
+ ///
+ public static bool RemoveHttpServer(uint port)
+ {
+ lock (m_Servers)
+ return m_Servers.Remove(port);
+ }
+
+ ///
+ /// Does this collection of servers contain one with the given port?
+ ///
+ ///
+ /// Unlike GetHttpServer, this will not instantiate a server if one does not exist on that port.
+ ///
+ ///
+ /// true if a server with the given port is registered, false otherwise.
+ public static bool ContainsHttpServer(uint port)
+ {
+ lock (m_Servers)
+ return m_Servers.ContainsKey(port);
+ }
+
+ ///
+ /// Get the default http server or an http server for a specific port.
+ ///
+ ///
+ /// If the requested HTTP server doesn't already exist then a new one is instantiated and started.
+ ///
+ ///
+ /// If 0 then the default HTTP server is returned.
+ public static IHttpServer GetHttpServer(uint port)
+ {
+ return GetHttpServer(port, null);
+ }
+
+ ///
+ /// Get the default http server, an http server for a specific port
+ /// and/or an http server bound to a specific address
+ ///
+ ///
+ /// If the requested HTTP server doesn't already exist then a new one is instantiated and started.
+ ///
+ ///
+ /// If 0 then the default HTTP server is returned.
+ /// A specific IP address to bind to. If null then the default IP address is used.
public static IHttpServer GetHttpServer(uint port, IPAddress ipaddr)
{
if (port == 0)
return Instance;
+
if (instance != null && port == Instance.Port)
return Instance;
- if (m_Servers.ContainsKey(port))
- return m_Servers[port];
+ lock (m_Servers)
+ {
+ if (m_Servers.ContainsKey(port))
+ return m_Servers[port];
- m_Servers[port] = new BaseHttpServer(port);
+ m_Servers[port] = new BaseHttpServer(port);
- if (ipaddr != null)
- m_Servers[port].ListenIPAddress = ipaddr;
+ if (ipaddr != null)
+ m_Servers[port].ListenIPAddress = ipaddr;
- m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
- m_Servers[port].Start();
+ m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
+ m_Servers[port].Start();
+ }
return m_Servers[port];
}
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 57a3c69b07..abb30a9117 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -249,11 +249,13 @@ namespace OpenSim
Debug);
m_console.Commands.AddCommand("Comms", false, "debug http",
- "debug http ",
- "Turn on inbound http request debugging for everything except the event queue (see debug eq).",
- "If level >= 2 then the handler used to service the request is logged.\n"
- + "If level >= 1 then incoming HTTP requests are logged.\n"
- + "If level <= 0 then no extra http logging is done.\n",
+ "debug http []",
+ "Turn on inbound non-poll http request debugging for everything except the event queue (see debug eq).",
+ "If level <= 0, then no extra logging is done.\n"
+ + "If level >= 1, then short warnings are logged when receiving bad input data.\n"
+ + "If level >= 2, then long warnings are logged when receiving bad input data.\n"
+ + "If level >= 3, then short notices about all incoming non-poll HTTP requests are logged.\n"
+ + "If no level is specified then the current level is returned.",
Debug);
m_console.Commands.AddCommand("Comms", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
@@ -920,13 +922,20 @@ namespace OpenSim
int newDebug;
if (int.TryParse(args[2], out newDebug))
{
- MainServer.Instance.DebugLevel = newDebug;
+ MainServer.DebugLevel = newDebug;
MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug);
break;
}
}
+ else if (args.Length == 2)
+ {
+ MainConsole.Instance.OutputFormat("Current debug http level is {0}", MainServer.DebugLevel);
+ }
+ else
+ {
+ MainConsole.Instance.Output("Usage: debug http 0..3");
+ }
- MainConsole.Instance.Output("Usage: debug http 0..2");
break;
case "scene":
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index c25b58cf8f..cd70410680 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -51,7 +51,16 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
[SetUp]
public void SetUp()
{
- MainServer.Instance = new BaseHttpServer(9999, false, 9998, "");
+ uint port = 9999;
+ uint sslPort = 9998;
+
+ // This is an unfortunate bit of clean up we have to do because MainServer manages things through static
+ // variables and the VM is not restarted between tests.
+ MainServer.RemoveHttpServer(port);
+
+ BaseHttpServer server = new BaseHttpServer(port, false, sslPort, "");
+ MainServer.AddHttpServer(server);
+ MainServer.Instance = server;
IConfigSource config = new IniConfigSource();
config.AddConfig("Startup");
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index f0f398417f..ba902b2a3b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -333,7 +333,6 @@ namespace OpenSim.Region.ClientStack.Linden
grp.AbsolutePosition = obj.Position;
prim.RotationOffset = obj.Rotation;
- grp.IsAttachment = false;
// Required for linking
grp.RootPart.ClearUpdateSchedule();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c4f167e2a1..4cb7a3a5d4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2719,6 +2719,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
+ public void SendAssetNotFound(AssetRequestToClient req)
+ {
+ TransferInfoPacket Transfer = new TransferInfoPacket();
+ Transfer.TransferInfo.ChannelType = 2;
+ Transfer.TransferInfo.Status = -2;
+ Transfer.TransferInfo.TargetType = 0;
+ Transfer.TransferInfo.Params = req.Params;
+ Transfer.TransferInfo.Size = 0;
+ Transfer.TransferInfo.TransferID = req.TransferRequestID;
+ Transfer.Header.Zerocoded = true;
+ OutPacket(Transfer, ThrottleOutPacketType.Asset);
+ }
+
public void SendTexture(AssetBase TextureAsset)
{
@@ -3722,8 +3735,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
- ++updatesThisCall;
-
#region UpdateFlags to packet type conversion
PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
@@ -3780,16 +3791,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!canUseImproved && !canUseCompressed)
{
+ ObjectUpdatePacket.ObjectDataBlock updateBlock;
+
if (update.Entity is ScenePresence)
{
- objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity));
- objectUpdates.Value.Add(update);
+ updateBlock = CreateAvatarUpdateBlock((ScenePresence)update.Entity);
}
else
{
- objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
- objectUpdates.Value.Add(update);
+ SceneObjectPart part = (SceneObjectPart)update.Entity;
+ updateBlock = CreatePrimUpdateBlock(part, AgentId);
+
+ // If the part has become a private hud since the update was scheduled then we do not
+ // want to send it to other avatars.
+ if (part.ParentGroup.IsAttachment
+ && part.ParentGroup.HasPrivateAttachmentPoint
+ && part.ParentGroup.AttachedAvatar != AgentId)
+ continue;
}
+
+ objectUpdateBlocks.Value.Add(updateBlock);
+ objectUpdates.Value.Add(update);
}
else if (!canUseImproved)
{
@@ -3806,15 +3828,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
+ ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseUpdateBlock
+ = CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures));
+
// Everything else goes here
- terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
+ if (update.Entity is SceneObjectPart)
+ {
+ SceneObjectPart part = (SceneObjectPart)update.Entity;
+
+ // If the part has become a private hud since the update was scheduled then we do not
+ // want to send it to other avatars.
+ if (part.ParentGroup.IsAttachment
+ && part.ParentGroup.HasPrivateAttachmentPoint
+ && part.ParentGroup.AttachedAvatar != AgentId)
+ continue;
+ }
+
+ terseUpdateBlocks.Value.Add(terseUpdateBlock);
terseUpdates.Value.Add(update);
}
}
+
+ ++updatesThisCall;
#endregion Block Construction
}
-
#region Packet Sending
ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);
@@ -11650,7 +11688,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
logPacket = false;
- if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate)
+ if (DebugPacketLevel <= 50
+ & (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate))
logPacket = false;
if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily)
@@ -11860,10 +11899,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return string.Empty;
}
- public void KillEndDone()
- {
- }
-
#region IClientCore
private readonly Dictionary m_clientInterfaces = new Dictionary();
@@ -11981,14 +12016,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
- if (asset == null)
- return;
-
TransferRequestPacket transferRequest = (TransferRequestPacket)sender;
UUID requestID = UUID.Zero;
byte source = (byte)SourceType.Asset;
+ AssetRequestToClient req = new AssetRequestToClient();
+
+ if (asset == null)
+ {
+ req.AssetInf = null;
+ req.AssetRequestSource = source;
+ req.IsTextureRequest = false;
+ req.NumPackets = 0;
+ req.Params = transferRequest.TransferInfo.Params;
+ req.RequestAssetID = requestID;
+ req.TransferRequestID = transferRequest.TransferInfo.TransferID;
+
+ SendAssetNotFound(req);
+ return;
+ }
+
if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
{
requestID = new UUID(transferRequest.TransferInfo.Params, 0);
@@ -12005,7 +12053,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return;
// The asset is known to exist and is in our cache, so add it to the AssetRequests list
- AssetRequestToClient req = new AssetRequestToClient();
req.AssetInf = asset;
req.AssetRequestSource = source;
req.IsTextureRequest = false;
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 6e78d6d774..c4324e8592 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -94,22 +94,19 @@ namespace OpenSim.Region.ClientStack
m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
m_httpServer.Start();
+ MainServer.AddHttpServer(m_httpServer);
MainServer.Instance = m_httpServer;
// "OOB" Server
if (m_networkServersInfo.ssl_listener)
{
- BaseHttpServer server = null;
- server = new BaseHttpServer(
+ BaseHttpServer server = new BaseHttpServer(
m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
m_networkServersInfo.cert_pass);
- // Add the server to m_Servers
- if(server != null)
- {
- m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
- MainServer.AddHttpServer(server);
- server.Start();
- }
+
+ m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
+ MainServer.AddHttpServer(server);
+ server.Start();
}
base.StartupSpecific();
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 88071f6184..b74c0ba646 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -562,6 +562,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
m_scene.SendKillObject(new List { so.RootPart.LocalId });
}
+ else if (so.HasPrivateAttachmentPoint)
+ {
+// m_log.DebugFormat(
+// "[ATTACHMENTS MODULE]: Killing private HUD {0} for avatars other than {1} at attachment point {2}",
+// so.Name, sp.Name, so.AttachmentPoint);
+
+ // As this scene object can now only be seen by the attaching avatar, tell everybody else in the
+ // scene that it's no longer in their awareness.
+ m_scene.ForEachClient(
+ client =>
+ { if (client.AgentId != so.AttachedAvatar)
+ client.SendKillObject(m_scene.RegionInfo.RegionHandle, new List() { so.LocalId });
+ });
+ }
so.IsSelected = false; // fudge....
so.ScheduleGroupForFullUpdate();
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index 40ffcb4a70..0003af2cc9 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -131,11 +131,12 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
{
// Start http server
// Attach xmlrpc handlers
- m_log.Info("[XML RPC MODULE]: " +
- "Starting up XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
- BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
+// m_log.InfoFormat(
+// "[XML RPC MODULE]: Starting up XMLRPC Server on port {0} for llRemoteData commands.",
+// m_remoteDataPort);
+
+ IHttpServer httpServer = MainServer.GetHttpServer((uint)m_remoteDataPort);
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
- httpServer.Start();
}
}
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 93b10052fc..d768a1ac16 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -78,11 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
if (grp.IsAttachment)
{
- if (grp.AttachmentPoint > 30) // HUD
- {
- if (sp.ControllingClient.AgentId != grp.OwnerID)
- return;
- }
+ if (grp.HasPrivateAttachmentPoint && sp.ControllingClient.AgentId != grp.OwnerID)
+ return;
if (sp.ControllingClient.AgentId == grp.OwnerID)
dis = 0;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 20d7a01bd7..619296ed61 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -180,6 +180,22 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ ///
+ /// If this scene object has an attachment point then indicate whether there is a point where
+ /// attachments are perceivable by avatars other than the avatar to which this object is attached.
+ ///
+ ///
+ /// HUDs are not perceivable by other avatars.
+ ///
+ public bool HasPrivateAttachmentPoint
+ {
+ get
+ {
+ return AttachmentPoint >= (uint)OpenMetaverse.AttachmentPoint.HUDCenter2
+ && AttachmentPoint <= (uint)OpenMetaverse.AttachmentPoint.HUDBottomRight;
+ }
+ }
+
public void ClearPartAttachmentData()
{
AttachmentPoint = 0;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 17c766191f..7640fc04b8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2573,8 +2573,9 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup.IsDeleted)
return;
- if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) &&
- (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
+ if (ParentGroup.IsAttachment
+ && ParentGroup.AttachedAvatar != remoteClient.AgentId
+ && ParentGroup.HasPrivateAttachmentPoint)
return;
if (remoteClient.AgentId == OwnerID)
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 43548e673f..3a3252853d 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1626,11 +1626,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
}
- public void KillEndDone()
- {
-
- }
-
public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
{
return true;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index e57e5e6f97..b3e10698fd 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1044,10 +1044,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
- public void KillEndDone()
- {
- }
-
public void SendEventInfoReply (EventData info)
{
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7ea8b7a4fb..7fa25f559e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1965,7 +1965,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
string retval = String.Empty;
IConfigSource config = m_ScriptEngine.ConfigSource;
- string url = config.Configs["GridInfo"].GetString("GridInfoURI", String.Empty);
+ string url = null;
+
+ IConfig gridInfoConfig = config.Configs["GridInfo"];
+
+ if (gridInfoConfig != null)
+ url = gridInfoConfig.GetString("GridInfoURI", String.Empty);
if (String.IsNullOrEmpty(url))
return "Configuration Error!";
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index d47155984f..7014303203 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -138,6 +138,7 @@ namespace OpenSim.Server.Base
m_HttpServer = new BaseHttpServer(port, ssl_main, cert_path, cert_pass);
}
+ MainServer.AddHttpServer(m_HttpServer);
MainServer.Instance = m_HttpServer;
// If https_listener = true, then add an ssl listener on the https_port...
@@ -157,16 +158,8 @@ namespace OpenSim.Server.Base
System.Console.WriteLine("Password for X509 certificate is missing, server can't start.");
Thread.CurrentThread.Abort();
}
- // Add our https_server
- BaseHttpServer server = null;
- server = new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass);
- if (server != null)
- {
- m_Log.InfoFormat("[SERVER]: Starting HTTPS server on port {0}", https_port);
- m_Servers.Add(https_port,server);
- }
- else
- System.Console.WriteLine(String.Format("Failed to start HTTPS server on port {0}",https_port));
+
+ m_Servers.Add(https_port, new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass));
}
}
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 8a60ca5467..11897f8809 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -84,6 +84,13 @@ namespace OpenSim.Services.GridService
if (MainConsole.Instance != null)
{
+ MainConsole.Instance.Commands.AddCommand("Regions", true,
+ "deregister region",
+ "deregister region ",
+ "Deregister a region manually.",
+ String.Empty,
+ HandleDeregisterRegion);
+
MainConsole.Instance.Commands.AddCommand("Regions", true,
"show region",
"show region ",
@@ -495,6 +502,44 @@ namespace OpenSim.Services.GridService
return -1;
}
+ private void HandleDeregisterRegion(string module, string[] cmd)
+ {
+ if (cmd.Length != 3)
+ {
+ MainConsole.Instance.Output("Syntax: degregister region ");
+ return;
+ }
+
+ string rawRegionUuid = cmd[2];
+ UUID regionUuid;
+
+ if (!UUID.TryParse(rawRegionUuid, out regionUuid))
+ {
+ MainConsole.Instance.OutputFormat("{0} is not a valid region uuid", rawRegionUuid);
+ return;
+ }
+
+ GridRegion region = GetRegionByUUID(UUID.Zero, regionUuid);
+
+ if (region == null)
+ {
+ MainConsole.Instance.OutputFormat("No region with UUID {0}", regionUuid);
+ return;
+ }
+
+ if (DeregisterRegion(regionUuid))
+ {
+ MainConsole.Instance.OutputFormat("Deregistered {0} {1}", region.RegionName, regionUuid);
+ }
+ else
+ {
+ // I don't think this can ever occur if we know that the region exists.
+ MainConsole.Instance.OutputFormat("Error deregistering {0} {1}", region.RegionName, regionUuid);
+ }
+
+ return;
+ }
+
private void HandleShowRegion(string module, string[] cmd)
{
if (cmd.Length != 3)
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 36049a1386..376465c053 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1123,10 +1123,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void KillEndDone()
- {
- }
-
public void SendEventInfoReply (EventData info)
{
}