Merge branch 'master' of /home/opensim/var/repo/opensim
commit
d7c5e240a5
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Control the printing of certain debug messages.
|
||||
/// </summary>
|
||||
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("<base64></base64>", "");
|
||||
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)
|
||||
|
|
|
@ -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,32 +39,130 @@ namespace OpenSim.Framework.Servers
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private static BaseHttpServer instance = null;
|
||||
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
||||
new Dictionary<uint, BaseHttpServer>();
|
||||
private static Dictionary<uint, BaseHttpServer> m_Servers = new Dictionary<uint, BaseHttpServer>();
|
||||
|
||||
/// <summary>
|
||||
/// Control the printing of certain debug messages.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// Set the main HTTP server instance.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will be used to register all handlers that listen to the default port.
|
||||
/// </remarks>
|
||||
/// <exception cref='Exception'>
|
||||
/// Thrown if the HTTP server has not already been registered via AddHttpServer()
|
||||
/// </exception>
|
||||
public static BaseHttpServer Instance
|
||||
{
|
||||
get { return instance; }
|
||||
set { instance = value; }
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register an already started HTTP server to the collection of known servers.
|
||||
/// </summary>
|
||||
/// <param name='server'></param>
|
||||
public static void AddHttpServer(BaseHttpServer 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the http server listening on the given port.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It is the responsibility of the caller to do clean up.
|
||||
/// </remarks>
|
||||
/// <param name='port'></param>
|
||||
/// <returns></returns>
|
||||
public static bool RemoveHttpServer(uint port)
|
||||
{
|
||||
lock (m_Servers)
|
||||
return m_Servers.Remove(port);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this collection of servers contain one with the given port?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Unlike GetHttpServer, this will not instantiate a server if one does not exist on that port.
|
||||
/// </remarks>
|
||||
/// <param name='port'></param>
|
||||
/// <returns>true if a server with the given port is registered, false otherwise.</returns>
|
||||
public static bool ContainsHttpServer(uint port)
|
||||
{
|
||||
lock (m_Servers)
|
||||
return m_Servers.ContainsKey(port);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the default http server or an http server for a specific port.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If the requested HTTP server doesn't already exist then a new one is instantiated and started.
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
/// <param name='port'>If 0 then the default HTTP server is returned.</param>
|
||||
public static IHttpServer GetHttpServer(uint port)
|
||||
{
|
||||
return GetHttpServer(port, null);
|
||||
}
|
||||
|
||||
public static void AddHttpServer(BaseHttpServer server)
|
||||
{
|
||||
m_Servers.Add(server.Port, server);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the default http server, an http server for a specific port
|
||||
/// and/or an http server bound to a specific address
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If the requested HTTP server doesn't already exist then a new one is instantiated and started.
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
/// <param name='port'>If 0 then the default HTTP server is returned.</param>
|
||||
/// <param name='ipaddr'>A specific IP address to bind to. If null then the default IP address is used.</param>
|
||||
public static IHttpServer GetHttpServer(uint port, IPAddress ipaddr)
|
||||
{
|
||||
if (port == 0)
|
||||
return Instance;
|
||||
|
||||
if (instance != null && port == Instance.Port)
|
||||
return Instance;
|
||||
|
||||
lock (m_Servers)
|
||||
{
|
||||
if (m_Servers.ContainsKey(port))
|
||||
return m_Servers[port];
|
||||
|
||||
|
@ -74,6 +173,7 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
|
||||
m_Servers[port].Start();
|
||||
}
|
||||
|
||||
return m_Servers[port];
|
||||
}
|
||||
|
|
|
@ -249,11 +249,13 @@ namespace OpenSim
|
|||
Debug);
|
||||
|
||||
m_console.Commands.AddCommand("Comms", false, "debug http",
|
||||
"debug http <level>",
|
||||
"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 [<level>]",
|
||||
"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":
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,16 +3828,32 @@ 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<Type, object> m_clientInterfaces = new Dictionary<Type, object>();
|
||||
|
@ -11981,14 +12016,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="asset"></param>
|
||||
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;
|
||||
|
|
|
@ -94,23 +94,20 @@ 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();
|
||||
}
|
||||
}
|
||||
|
||||
base.StartupSpecific();
|
||||
}
|
||||
|
|
|
@ -562,6 +562,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
{
|
||||
m_scene.SendKillObject(new List<uint> { 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<uint>() { so.LocalId });
|
||||
});
|
||||
}
|
||||
|
||||
so.IsSelected = false; // fudge....
|
||||
so.ScheduleGroupForFullUpdate();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,11 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
|||
|
||||
if (grp.IsAttachment)
|
||||
{
|
||||
if (grp.AttachmentPoint > 30) // HUD
|
||||
{
|
||||
if (sp.ControllingClient.AgentId != grp.OwnerID)
|
||||
if (grp.HasPrivateAttachmentPoint && sp.ControllingClient.AgentId != grp.OwnerID)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sp.ControllingClient.AgentId == grp.OwnerID)
|
||||
dis = 0;
|
||||
|
|
|
@ -180,6 +180,22 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// HUDs are not perceivable by other avatars.
|
||||
/// </remarks>
|
||||
public bool HasPrivateAttachmentPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return AttachmentPoint >= (uint)OpenMetaverse.AttachmentPoint.HUDCenter2
|
||||
&& AttachmentPoint <= (uint)OpenMetaverse.AttachmentPoint.HUDBottomRight;
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearPartAttachmentData()
|
||||
{
|
||||
AttachmentPoint = 0;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1626,11 +1626,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
|
||||
}
|
||||
|
||||
public void KillEndDone()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -1044,10 +1044,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
{
|
||||
}
|
||||
|
||||
public void KillEndDone()
|
||||
{
|
||||
}
|
||||
|
||||
public void SendEventInfoReply (EventData info)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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!";
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,13 @@ namespace OpenSim.Services.GridService
|
|||
|
||||
if (MainConsole.Instance != null)
|
||||
{
|
||||
MainConsole.Instance.Commands.AddCommand("Regions", true,
|
||||
"deregister region",
|
||||
"deregister region <Region UUID>",
|
||||
"Deregister a region manually.",
|
||||
String.Empty,
|
||||
HandleDeregisterRegion);
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand("Regions", true,
|
||||
"show region",
|
||||
"show region <Region name>",
|
||||
|
@ -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 <Region UUID>");
|
||||
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)
|
||||
|
|
|
@ -1123,10 +1123,6 @@ namespace OpenSim.Tests.Common.Mock
|
|||
{
|
||||
}
|
||||
|
||||
public void KillEndDone()
|
||||
{
|
||||
}
|
||||
|
||||
public void SendEventInfoReply (EventData info)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue