Merge branch 'master' into careminster-presence-refactor
commit
4e0d6e8e41
|
@ -1,5 +0,0 @@
|
||||||
BEGIN;
|
|
||||||
|
|
||||||
ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
|
|
||||||
|
|
||||||
COMMIT;
|
|
|
@ -1,6 +0,0 @@
|
||||||
BEGIN;
|
|
||||||
|
|
||||||
ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
|
|
||||||
ALTER TABLE primshapes ADD COLUMN Media TEXT;
|
|
||||||
|
|
||||||
COMMIT;
|
|
|
@ -449,6 +449,17 @@ COMMIT;
|
||||||
|
|
||||||
:VERSION 19
|
:VERSION 19
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
:VERSION 20
|
||||||
|
BEGIN;
|
||||||
|
ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
|
||||||
|
ALTER TABLE primshapes ADD COLUMN Media TEXT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
:VERSION 21
|
||||||
|
BEGIN;
|
||||||
ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none';
|
ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none';
|
||||||
ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
|
ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
|
||||||
ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
|
ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
|
||||||
|
|
|
@ -338,19 +338,25 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
// HandleRequest(request,resp);
|
// HandleRequest(request,resp);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This methods is the start of incoming HTTP request handling.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="response"></param>
|
||||||
public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
|
public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
|
||||||
|
|
||||||
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
|
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
|
||||||
|
|
||||||
// This is the REST agent interface. We require an agent to properly identify
|
// This is the REST agent interface. We require an agent to properly identify
|
||||||
// itself. If the REST handler recognizes the prefix it will attempt to
|
// itself. If the REST handler recognizes the prefix it will attempt to
|
||||||
// satisfy the request. If it is not recognizable, and no damage has occurred
|
// satisfy the request. If it is not recognizable, and no damage has occurred
|
||||||
// the request can be passed through to the other handlers. This is a low
|
// the request can be passed through to the other handlers. This is a low
|
||||||
// probability event; if a request is matched it is normally expected to be
|
// probability event; if a request is matched it is normally expected to be
|
||||||
// handled
|
// handled
|
||||||
// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
|
|
||||||
|
|
||||||
IHttpAgentHandler agentHandler;
|
IHttpAgentHandler agentHandler;
|
||||||
|
|
||||||
if (TryGetAgentHandler(request, response, out agentHandler))
|
if (TryGetAgentHandler(request, response, out agentHandler))
|
||||||
|
|
|
@ -218,7 +218,13 @@ namespace OpenSim
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "debug packet",
|
m_console.Commands.AddCommand("region", false, "debug packet",
|
||||||
"debug packet <level>",
|
"debug packet <level>",
|
||||||
"Turn on packet debugging", Debug);
|
"Turn on packet debugging",
|
||||||
|
"If level > 255 then all incoming and outgoing packets are logged.\n"
|
||||||
|
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
|
||||||
|
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
|
||||||
|
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
|
||||||
|
+ "If level <= 0 then no packets are logged.",
|
||||||
|
Debug);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||||
"debug scene <cripting> <collisions> <physics>",
|
"debug scene <cripting> <collisions> <physics>",
|
||||||
|
|
|
@ -36,7 +36,6 @@ using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
@ -403,7 +402,9 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace);
|
m_log.ErrorFormat(
|
||||||
|
"[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
|
||||||
if (scene.SnmpService != null)
|
if (scene.SnmpService != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
|
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
|
||||||
{
|
{
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets).
|
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
|
||||||
/// </value>
|
/// </value>
|
||||||
protected int m_debugPacketLevel = 0;
|
protected int m_debugPacketLevel = 0;
|
||||||
|
|
||||||
|
@ -11229,8 +11229,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// handles splitting manually</param>
|
/// handles splitting manually</param>
|
||||||
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting)
|
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting)
|
||||||
{
|
{
|
||||||
if (m_debugPacketLevel >= 255)
|
if (m_debugPacketLevel > 0)
|
||||||
|
{
|
||||||
|
bool outputPacket = true;
|
||||||
|
|
||||||
|
if (m_debugPacketLevel <= 255
|
||||||
|
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
|
||||||
|
outputPacket = false;
|
||||||
|
|
||||||
|
if (m_debugPacketLevel <= 200
|
||||||
|
&&
|
||||||
|
(packet.Type == PacketType.ImagePacket
|
||||||
|
|| packet.Type == PacketType.ImageData
|
||||||
|
|| packet.Type == PacketType.LayerData
|
||||||
|
|| packet.Type == PacketType.CoarseLocationUpdate))
|
||||||
|
outputPacket = false;
|
||||||
|
|
||||||
|
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
|
||||||
|
outputPacket = false;
|
||||||
|
|
||||||
|
if (outputPacket)
|
||||||
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
|
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
|
||||||
|
}
|
||||||
|
|
||||||
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
|
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
|
||||||
}
|
}
|
||||||
|
@ -11316,26 +11336,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// Entryway from the client to the simulator. All UDP packets from the client will end up here
|
/// Entryway from the client to the simulator. All UDP packets from the client will end up here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Pack">OpenMetaverse.packet</param>
|
/// <param name="Pack">OpenMetaverse.packet</param>
|
||||||
public void ProcessInPacket(Packet Pack)
|
public void ProcessInPacket(Packet packet)
|
||||||
{
|
{
|
||||||
if (!m_IsPresenceReady)
|
if (m_debugPacketLevel > 0)
|
||||||
{
|
{
|
||||||
if (m_pendingPackets == null)
|
bool outputPacket = true;
|
||||||
{
|
|
||||||
m_pendingPackets = new List<Packet>();
|
|
||||||
}
|
|
||||||
m_pendingPackets.Add(Pack);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_debugPacketLevel >= 255)
|
|
||||||
m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type);
|
|
||||||
|
|
||||||
if (!ProcessPacketMethod(Pack))
|
if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
|
||||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type);
|
outputPacket = false;
|
||||||
|
|
||||||
PacketPool.Instance.ReturnPacket(Pack);
|
if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
|
||||||
|
outputPacket = false;
|
||||||
|
|
||||||
|
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
|
||||||
|
outputPacket = false;
|
||||||
|
|
||||||
|
if (outputPacket)
|
||||||
|
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ProcessPacketMethod(packet))
|
||||||
|
m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
|
||||||
|
|
||||||
|
PacketPool.Instance.ReturnPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)
|
private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)
|
||||||
|
|
|
@ -174,17 +174,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
UUID itemID = UUID.Zero;
|
UUID itemID = UUID.Zero;
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
foreach(SceneObjectGroup grp in sp.Attachments)
|
foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
|
||||||
{
|
|
||||||
if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
|
|
||||||
{
|
{
|
||||||
itemID = grp.GetFromItemID();
|
itemID = grp.GetFromItemID();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (itemID != UUID.Zero)
|
if (itemID != UUID.Zero)
|
||||||
DetachSingleAttachmentToInv(itemID, remoteClient);
|
DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (group.GetFromItemID() == UUID.Zero)
|
if (group.GetFromItemID() == UUID.Zero)
|
||||||
{
|
{
|
||||||
|
@ -197,12 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
|
|
||||||
SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group);
|
SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group);
|
||||||
|
|
||||||
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
|
AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
|
||||||
|
|
||||||
// In case it is later dropped again, don't let
|
|
||||||
// it get cleaned up
|
|
||||||
group.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
|
|
||||||
group.HasGroupChanged = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -552,5 +543,77 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attach this scene object to the given avatar.
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
/// This isn't publicly available since attachments should always perform the corresponding inventory
|
||||||
|
/// operation (to show the attach in user inventory and update the asset with positional information).
|
||||||
|
///
|
||||||
|
/// <param name="sp"></param>
|
||||||
|
/// <param name="so"></param>
|
||||||
|
/// <param name="attachmentpoint"></param>
|
||||||
|
/// <param name="AttachOffset"></param>
|
||||||
|
/// <param name="silent"></param>
|
||||||
|
protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 AttachOffset, bool silent)
|
||||||
|
{
|
||||||
|
// don't attach attachments to child agents
|
||||||
|
if (avatar.IsChildAgent) return;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
|
||||||
|
|
||||||
|
so.DetachFromBackup();
|
||||||
|
|
||||||
|
// Remove from database and parcel prim count
|
||||||
|
m_scene.DeleteFromStorage(so.UUID);
|
||||||
|
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
||||||
|
|
||||||
|
so.RootPart.AttachedAvatar = avatar.UUID;
|
||||||
|
|
||||||
|
//Anakin Lohner bug #3839
|
||||||
|
lock (so.Children)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart p in so.Children.Values)
|
||||||
|
{
|
||||||
|
p.AttachedAvatar = avatar.UUID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (so.RootPart.PhysActor != null)
|
||||||
|
{
|
||||||
|
m_scene.PhysicsScene.RemovePrim(so.RootPart.PhysActor);
|
||||||
|
so.RootPart.PhysActor = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
so.AbsolutePosition = AttachOffset;
|
||||||
|
so.RootPart.AttachedPos = AttachOffset;
|
||||||
|
so.RootPart.IsAttachment = true;
|
||||||
|
|
||||||
|
so.RootPart.SetParentLocalId(avatar.LocalId);
|
||||||
|
so.SetAttachmentPoint(Convert.ToByte(attachmentpoint));
|
||||||
|
|
||||||
|
avatar.AddAttachment(so);
|
||||||
|
|
||||||
|
if (!silent)
|
||||||
|
{
|
||||||
|
// Killing it here will cause the client to deselect it
|
||||||
|
// It then reappears on the avatar, deselected
|
||||||
|
// through the full update below
|
||||||
|
//
|
||||||
|
if (so.IsSelected)
|
||||||
|
{
|
||||||
|
m_scene.SendKillObject(so.RootPart.LocalId);
|
||||||
|
}
|
||||||
|
|
||||||
|
so.IsSelected = false; // fudge....
|
||||||
|
so.ScheduleGroupForFullUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
// In case it is later dropped again, don't let
|
||||||
|
// it get cleaned up
|
||||||
|
so.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
|
||||||
|
so.HasGroupChanged = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3912,6 +3912,27 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the scene object attached to the given point.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="attachmentPoint"></param>
|
||||||
|
/// <returns>Returns an empty list if there were no attachments at the point.</returns>
|
||||||
|
public List<SceneObjectGroup> GetAttachments(uint attachmentPoint)
|
||||||
|
{
|
||||||
|
List<SceneObjectGroup> attachments = new List<SceneObjectGroup>();
|
||||||
|
|
||||||
|
lock (m_attachments)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectGroup so in m_attachments)
|
||||||
|
{
|
||||||
|
if (attachmentPoint == so.RootPart.AttachmentPoint)
|
||||||
|
attachments.Add(so);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return attachments;
|
||||||
|
}
|
||||||
|
|
||||||
public bool HasAttachments()
|
public bool HasAttachments()
|
||||||
{
|
{
|
||||||
return m_attachments.Count > 0;
|
return m_attachments.Count > 0;
|
||||||
|
|
|
@ -86,13 +86,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
paramList.Add(hash);
|
paramList.Add(hash);
|
||||||
|
|
||||||
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
|
||||||
IPEndPoint ext = info.ExternalEndPoint;
|
string uri = "http://" + ((info.ServerURI == string.Empty) ? info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" : info.ServerURI);
|
||||||
string uri = "";
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
|
||||||
if (ext != null)
|
|
||||||
{
|
|
||||||
uri = "http://" + ext.Address + ":" + info.HttpPort + "/";
|
|
||||||
}
|
|
||||||
//m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
|
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -193,12 +188,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
paramList.Add(hash);
|
paramList.Add(hash);
|
||||||
|
|
||||||
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
||||||
IPEndPoint ext = gatekeeper.ExternalEndPoint;
|
string uri = "http://" + ((gatekeeper.ServerURI == string.Empty) ? gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/" : gatekeeper.ServerURI);
|
||||||
string uri = "";
|
|
||||||
if (ext != null)
|
|
||||||
{
|
|
||||||
uri = "http://" + ext.Address + ":" + gatekeeper.HttpPort + "/";
|
|
||||||
}
|
|
||||||
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
|
|
|
@ -51,15 +51,16 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
string m_ServerURL;
|
string m_ServerURL;
|
||||||
Uri m_Uri;
|
|
||||||
public UserAgentServiceConnector(string url)
|
public UserAgentServiceConnector(string url)
|
||||||
{
|
{
|
||||||
m_ServerURL = url;
|
m_ServerURL = url;
|
||||||
|
// Doing this here, because XML-RPC or mono have some strong ideas about
|
||||||
|
// caching DNS translations.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_Uri = new Uri(m_ServerURL);
|
Uri m_Uri = new Uri(m_ServerURL);
|
||||||
IPAddress ip = Util.GetHostFromDNS(m_Uri.Host);
|
IPAddress ip = Util.GetHostFromDNS(m_Uri.Host);
|
||||||
m_ServerURL = "http://" + ip.ToString() + ":" + m_Uri.Port;
|
m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); ;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,8 +104,13 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eventually, we want to use a caps url instead of the agentID
|
|
||||||
string uri = string.Empty;
|
string uri = string.Empty;
|
||||||
|
|
||||||
|
// HACK -- Simian grid make it work!!!
|
||||||
|
if (destination.ServerURI != string.Empty)
|
||||||
|
uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
|
||||||
|
else
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/";
|
uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/";
|
||||||
|
@ -116,6 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
reason = e.Message;
|
reason = e.Message;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
|
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ namespace OpenSim.Services.GridService
|
||||||
string host = "127.0.0.1";
|
string host = "127.0.0.1";
|
||||||
string portstr;
|
string portstr;
|
||||||
string regionName = "";
|
string regionName = "";
|
||||||
uint port = 9000;
|
uint port = 0;
|
||||||
string[] parts = mapName.Split(new char[] { ':' });
|
string[] parts = mapName.Split(new char[] { ':' });
|
||||||
if (parts.Length >= 1)
|
if (parts.Length >= 1)
|
||||||
{
|
{
|
||||||
|
@ -177,18 +177,16 @@ namespace OpenSim.Services.GridService
|
||||||
regionName = parts[2];
|
regionName = parts[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanity check.
|
//// Sanity check.
|
||||||
//IPAddress ipaddr = null;
|
//try
|
||||||
try
|
//{
|
||||||
{
|
// Util.GetHostFromDNS(host);
|
||||||
//ipaddr = Util.GetHostFromDNS(host);
|
//}
|
||||||
Util.GetHostFromDNS(host);
|
//catch
|
||||||
}
|
//{
|
||||||
catch
|
// reason = "Malformed hostname";
|
||||||
{
|
// return null;
|
||||||
reason = "Malformed hostname";
|
//}
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
GridRegion regInfo;
|
GridRegion regInfo;
|
||||||
bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, out regInfo, out reason);
|
bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, out regInfo, out reason);
|
||||||
|
@ -217,6 +215,11 @@ namespace OpenSim.Services.GridService
|
||||||
regInfo.RegionLocY = yloc;
|
regInfo.RegionLocY = yloc;
|
||||||
regInfo.ScopeID = scopeID;
|
regInfo.ScopeID = scopeID;
|
||||||
|
|
||||||
|
// Big HACK for Simian Grid !!!
|
||||||
|
// We need to clean up all URLs used in OpenSim !!!
|
||||||
|
if (externalHostName.Contains("/"))
|
||||||
|
regInfo.ServerURI = externalHostName;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0);
|
regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0);
|
||||||
|
|
|
@ -293,13 +293,35 @@ namespace OpenSim.Services.InventoryService
|
||||||
|
|
||||||
public virtual bool AddFolder(InventoryFolderBase folder)
|
public virtual bool AddFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
|
InventoryFolderBase check = GetFolder(folder);
|
||||||
|
if (check != null)
|
||||||
|
return false;
|
||||||
|
|
||||||
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||||
return m_Database.StoreFolder(xFolder);
|
return m_Database.StoreFolder(xFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool UpdateFolder(InventoryFolderBase folder)
|
public virtual bool UpdateFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
|
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||||
|
InventoryFolderBase check = GetFolder(folder);
|
||||||
|
if (check == null)
|
||||||
return AddFolder(folder);
|
return AddFolder(folder);
|
||||||
|
|
||||||
|
if (check.Type != -1 || xFolder.type != -1)
|
||||||
|
{
|
||||||
|
if (xFolder.version > check.Version)
|
||||||
|
return false;
|
||||||
|
check.Version = (ushort)xFolder.version;
|
||||||
|
xFolder = ConvertFromOpenSim(check);
|
||||||
|
return m_Database.StoreFolder(xFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xFolder.version < check.Version)
|
||||||
|
xFolder.version = check.Version;
|
||||||
|
xFolder.folderID = check.ID;
|
||||||
|
|
||||||
|
return m_Database.StoreFolder(xFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool MoveFolder(InventoryFolderBase folder)
|
public virtual bool MoveFolder(InventoryFolderBase folder)
|
||||||
|
|
Loading…
Reference in New Issue