Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
b643661938
|
@ -128,6 +128,11 @@
|
||||||
</exec>
|
</exec>
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
||||||
|
|
||||||
|
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.optionalmodules.tests">
|
||||||
|
<arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" />
|
||||||
|
</exec>
|
||||||
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.optionalmodules.tests)==0}" />
|
||||||
|
|
||||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.framework.tests">
|
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.framework.tests">
|
||||||
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
|
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -202,6 +207,17 @@
|
||||||
<arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
|
<arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
|
<exec program="mono">
|
||||||
|
<arg value="--debug" />
|
||||||
|
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.OptionalModules.cov,+[OpenSim.Region.OptionalModules]" />
|
||||||
|
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||||
|
<arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" />
|
||||||
|
</exec>
|
||||||
|
<delete dir="./cov/OpenSim.Region.OptionalModules" />
|
||||||
|
<exec program="monocov">
|
||||||
|
<arg value="--export-html=./cov/OpenSim.Region.OptionalModules ./cov/OpenSim.Region.OptionalModules.cov" />
|
||||||
|
</exec>
|
||||||
|
|
||||||
<exec program="mono">
|
<exec program="mono">
|
||||||
<arg value="--debug" />
|
<arg value="--debug" />
|
||||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
|
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
|
||||||
|
@ -298,6 +314,11 @@
|
||||||
<arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" />
|
<arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" />
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
|
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.optionalmodules.tests">
|
||||||
|
<arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" />
|
||||||
|
<arg value="-xml=test-results/OpenSim.Region.OptionalModules.Tests.dll-Results.xml" />
|
||||||
|
</exec>
|
||||||
|
|
||||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests">
|
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests">
|
||||||
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
|
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
|
||||||
<arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" />
|
<arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" />
|
||||||
|
@ -314,6 +335,7 @@
|
||||||
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
|
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
||||||
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.optionalmodules.tests)==0}" />
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
||||||
|
|
||||||
|
@ -338,6 +360,7 @@
|
||||||
<!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
|
||||||
<!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
|
||||||
<!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
|
||||||
|
<!-- <include name="./bin/OpenSim.Region.OptionalModules.Tests.dll" /> -->
|
||||||
<!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
|
||||||
<!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
|
||||||
<!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
|
<!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
|
||||||
|
|
|
@ -174,9 +174,10 @@ namespace OpenSim.Framework
|
||||||
public delegate void ParcelAccessListRequest(
|
public delegate void ParcelAccessListRequest(
|
||||||
UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
|
UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void ParcelAccessListUpdateRequest(
|
public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags,
|
||||||
UUID agentID, UUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
|
int landLocalID, UUID transactionID, int sequenceID,
|
||||||
IClientAPI remote_client);
|
int sections, List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
|
IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void ParcelPropertiesRequest(
|
public delegate void ParcelPropertiesRequest(
|
||||||
int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
|
int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
|
||||||
|
|
|
@ -1845,7 +1845,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
/// property in StartHttp() for the HttpListener
|
/// property in StartHttp() for the HttpListener
|
||||||
public class HttpServerLogWriter : ILogWriter
|
public class HttpServerLogWriter : ILogWriter
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public void Write(object source, LogPrio priority, string message)
|
public void Write(object source, LogPrio priority, string message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -265,10 +265,11 @@ namespace OpenSim
|
||||||
LoadOar);
|
LoadOar);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "save oar",
|
m_console.Commands.AddCommand("region", false, "save oar",
|
||||||
"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
|
//"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
|
||||||
|
"save oar [-p|--profile=<url>] [<OAR path>]",
|
||||||
"Save a region's data to an OAR archive.",
|
"Save a region's data to an OAR archive.",
|
||||||
"-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
|
// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
|
||||||
+ "-p|--profile=<url> adds the url of the profile service to the saved user information" + Environment.NewLine
|
"-p|--profile=<url> adds the url of the profile service to the saved user information" + Environment.NewLine
|
||||||
+ "The OAR path must be a filesystem path."
|
+ "The OAR path must be a filesystem path."
|
||||||
+ " If this is not given then the oar is saved to region.oar in the current directory.",
|
+ " If this is not given then the oar is saved to region.oar in the current directory.",
|
||||||
SaveOar);
|
SaveOar);
|
||||||
|
|
|
@ -3553,111 +3553,114 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
||||||
OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
|
OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseAgentUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
|
|
||||||
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
|
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
|
||||||
int updatesThisCall = 0;
|
int updatesThisCall = 0;
|
||||||
|
|
||||||
lock (m_entityUpdates.SyncRoot)
|
EntityUpdate update;
|
||||||
|
while (updatesThisCall < maxUpdates)
|
||||||
{
|
{
|
||||||
EntityUpdate update;
|
lock (m_entityUpdates.SyncRoot)
|
||||||
while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
|
if (!m_entityUpdates.TryDequeue(out update))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (update.Entity is SceneObjectPart)
|
||||||
{
|
{
|
||||||
if (update.Entity is SceneObjectPart)
|
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
||||||
|
|
||||||
|
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
|
||||||
|
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
|
||||||
|
// safety measure.
|
||||||
|
//
|
||||||
|
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
|
||||||
|
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
|
||||||
|
// updates and kills on different threads with different scheduling strategies, hence this protection.
|
||||||
|
//
|
||||||
|
// This doesn't appear to apply to child prims - a client will happily ignore these updates
|
||||||
|
// after the root prim has been deleted.
|
||||||
|
if (m_killRecord.Contains(part.LocalId))
|
||||||
{
|
{
|
||||||
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
// m_log.WarnFormat(
|
||||||
|
// "[CLIENT]: Preventing update for prim with local id {0} after client for user {1} told it was deleted",
|
||||||
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
|
// part.LocalId, Name);
|
||||||
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
|
continue;
|
||||||
// safety measure.
|
|
||||||
//
|
|
||||||
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
|
|
||||||
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
|
|
||||||
// updates and kills on different threads with different scheduling strategies, hence this protection.
|
|
||||||
//
|
|
||||||
// This doesn't appear to apply to child prims - a client will happily ignore these updates
|
|
||||||
// after the root prim has been deleted.
|
|
||||||
if (m_killRecord.Contains(part.LocalId))
|
|
||||||
{
|
|
||||||
// m_log.WarnFormat(
|
|
||||||
// "[CLIENT]: Preventing update for prim with local id {0} after client for user {1} told it was deleted",
|
|
||||||
// part.LocalId, Name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (part.ParentGroup.IsAttachment && m_disableFacelights)
|
|
||||||
{
|
|
||||||
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
|
|
||||||
part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand)
|
|
||||||
{
|
|
||||||
part.Shape.LightEntry = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
++updatesThisCall;
|
if (part.ParentGroup.IsAttachment && m_disableFacelights)
|
||||||
|
{
|
||||||
|
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
|
||||||
|
part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand)
|
||||||
|
{
|
||||||
|
part.Shape.LightEntry = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region UpdateFlags to packet type conversion
|
++updatesThisCall;
|
||||||
|
|
||||||
PrimUpdateFlags updateFlags = update.Flags;
|
#region UpdateFlags to packet type conversion
|
||||||
|
|
||||||
bool canUseCompressed = true;
|
PrimUpdateFlags updateFlags = update.Flags;
|
||||||
bool canUseImproved = true;
|
|
||||||
|
|
||||||
// Compressed object updates only make sense for LL primitives
|
bool canUseCompressed = true;
|
||||||
if (!(update.Entity is SceneObjectPart))
|
bool canUseImproved = true;
|
||||||
|
|
||||||
|
// Compressed object updates only make sense for LL primitives
|
||||||
|
if (!(update.Entity is SceneObjectPart))
|
||||||
|
{
|
||||||
|
canUseCompressed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
|
||||||
|
{
|
||||||
|
canUseCompressed = false;
|
||||||
|
canUseImproved = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Acceleration) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Joint))
|
||||||
{
|
{
|
||||||
canUseCompressed = false;
|
canUseCompressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
|
if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.ParentID) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Scale) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.PrimData) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Text) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.NameValue) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.ExtraData) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Sound) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Particles) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Material) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.ClickAction) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.MediaURL) ||
|
||||||
|
updateFlags.HasFlag(PrimUpdateFlags.Joint))
|
||||||
{
|
{
|
||||||
canUseCompressed = false;
|
|
||||||
canUseImproved = false;
|
canUseImproved = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion UpdateFlags to packet type conversion
|
||||||
|
|
||||||
|
#region Block Construction
|
||||||
|
|
||||||
|
// TODO: Remove this once we can build compressed updates
|
||||||
|
canUseCompressed = false;
|
||||||
|
|
||||||
|
if (!canUseImproved && !canUseCompressed)
|
||||||
|
{
|
||||||
|
if (update.Entity is ScenePresence)
|
||||||
|
{
|
||||||
|
objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Acceleration) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
|
|
||||||
{
|
|
||||||
canUseCompressed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.ParentID) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Scale) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.PrimData) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Text) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.NameValue) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.ExtraData) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Sound) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Particles) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Material) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.ClickAction) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.MediaURL) ||
|
|
||||||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
|
|
||||||
{
|
|
||||||
canUseImproved = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion UpdateFlags to packet type conversion
|
|
||||||
|
|
||||||
#region Block Construction
|
|
||||||
|
|
||||||
// TODO: Remove this once we can build compressed updates
|
|
||||||
canUseCompressed = false;
|
|
||||||
|
|
||||||
if (!canUseImproved && !canUseCompressed)
|
|
||||||
{
|
|
||||||
if (update.Entity is ScenePresence)
|
|
||||||
{
|
|
||||||
objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment)
|
// if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment)
|
||||||
// {
|
// {
|
||||||
// SceneObjectPart sop = (SceneObjectPart)update.Entity;
|
// SceneObjectPart sop = (SceneObjectPart)update.Entity;
|
||||||
|
@ -3686,71 +3689,90 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
|
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!canUseImproved)
|
|
||||||
{
|
|
||||||
compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (!canUseImproved)
|
||||||
|
{
|
||||||
|
compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId)
|
||||||
|
// Self updates go into a special list
|
||||||
|
terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
|
||||||
else
|
else
|
||||||
{
|
// Everything else goes here
|
||||||
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
|
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Block Construction
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Packet Sending
|
#endregion Block Construction
|
||||||
|
}
|
||||||
|
|
||||||
const float TIME_DILATION = 1.0f;
|
#region Packet Sending
|
||||||
ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
if (objectUpdateBlocks.IsValueCreated)
|
const float TIME_DILATION = 1.0f;
|
||||||
{
|
ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
|
||||||
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
|
|
||||||
|
|
||||||
ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
|
if (terseAgentUpdateBlocks.IsValueCreated)
|
||||||
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
{
|
||||||
packet.RegionData.TimeDilation = timeDilation;
|
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value;
|
||||||
packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||||
|
packet.RegionData.TimeDilation = timeDilation;
|
||||||
|
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
}
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
if (compressedUpdateBlocks.IsValueCreated)
|
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
|
||||||
{
|
}
|
||||||
List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
|
|
||||||
|
|
||||||
ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
|
if (objectUpdateBlocks.IsValueCreated)
|
||||||
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
{
|
||||||
packet.RegionData.TimeDilation = timeDilation;
|
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
|
||||||
packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
|
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||||
|
packet.RegionData.TimeDilation = timeDilation;
|
||||||
|
packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
}
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
if (terseUpdateBlocks.IsValueCreated)
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
{
|
}
|
||||||
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
|
|
||||||
|
|
||||||
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
|
if (compressedUpdateBlocks.IsValueCreated)
|
||||||
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
{
|
||||||
packet.RegionData.TimeDilation = timeDilation;
|
List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
|
||||||
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||||
|
packet.RegionData.TimeDilation = timeDilation;
|
||||||
|
packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
}
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (terseUpdateBlocks.IsValueCreated)
|
||||||
|
{
|
||||||
|
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
|
||||||
|
|
||||||
|
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
|
||||||
|
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||||
|
packet.RegionData.TimeDilation = timeDilation;
|
||||||
|
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
||||||
|
|
||||||
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Packet Sending
|
#endregion Packet Sending
|
||||||
|
@ -8239,7 +8261,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
entry.AgentID = block.ID;
|
entry.AgentID = block.ID;
|
||||||
entry.Flags = (AccessList)block.Flags;
|
entry.Flags = (AccessList)block.Flags;
|
||||||
entry.Time = new DateTime();
|
entry.Time = Util.ToDateTime(block.Time);
|
||||||
entries.Add(entry);
|
entries.Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8247,8 +8269,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (handlerParcelAccessListUpdateRequest != null)
|
if (handlerParcelAccessListUpdateRequest != null)
|
||||||
{
|
{
|
||||||
handlerParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
|
handlerParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
|
||||||
updatePacket.AgentData.SessionID, updatePacket.Data.Flags,
|
updatePacket.Data.Flags,
|
||||||
updatePacket.Data.LocalID, entries, this);
|
updatePacket.Data.LocalID,
|
||||||
|
updatePacket.Data.TransactionID,
|
||||||
|
updatePacket.Data.SequenceID,
|
||||||
|
updatePacket.Data.Sections,
|
||||||
|
entries, this);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.CreatorID);
|
AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID);
|
||||||
newTexture.Data = ConvertTextureData(texture, format);
|
newTexture.Data = ConvertTextureData(texture, format);
|
||||||
if (newTexture.Data.Length == 0)
|
if (newTexture.Data.Length == 0)
|
||||||
return false; // !!! Caller try another codec, please!
|
return false; // !!! Caller try another codec, please!
|
||||||
|
@ -336,7 +336,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular jpeg data
|
// Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data
|
||||||
|
|
||||||
imgstream = new MemoryStream();
|
imgstream = new MemoryStream();
|
||||||
|
|
||||||
|
|
|
@ -484,6 +484,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
|
||||||
|
{
|
||||||
|
// First we save the
|
||||||
|
// attachment point information, then we update the relative
|
||||||
|
// positioning. Then we have to mark the object as NOT an
|
||||||
|
// attachment. This is necessary in order to correctly save
|
||||||
|
// and retrieve GroupPosition information for the attachment.
|
||||||
|
// Finally, we restore the object's attachment status.
|
||||||
|
byte attachmentPoint = sog.GetAttachmentPoint();
|
||||||
|
sog.UpdateGroupPosition(pos);
|
||||||
|
sog.RootPart.IsAttachment = false;
|
||||||
|
sog.AbsolutePosition = sog.RootPart.AttachedPos;
|
||||||
|
sog.SetAttachmentPoint(attachmentPoint);
|
||||||
|
sog.HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the attachment asset for the new sog details if they have changed.
|
/// Update the attachment asset for the new sog details if they have changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -156,7 +156,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
/// <param name="inventoryFolder">The inventory folder to save</param>
|
/// <param name="inventoryFolder">The inventory folder to save</param>
|
||||||
/// <param name="path">The path to which the folder should be saved</param>
|
/// <param name="path">The path to which the folder should be saved</param>
|
||||||
/// <param name="saveThisFolderItself">If true, save this folder itself. If false, only saves contents</param>
|
/// <param name="saveThisFolderItself">If true, save this folder itself. If false, only saves contents</param>
|
||||||
protected void SaveInvFolder(InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself, Dictionary<string, object> options, IUserAccountService userAccountService)
|
/// <param name="options"></param>
|
||||||
|
/// <param name="userAccountService"></param>
|
||||||
|
protected void SaveInvFolder(
|
||||||
|
InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself,
|
||||||
|
Dictionary<string, object> options, IUserAccountService userAccountService)
|
||||||
{
|
{
|
||||||
if (saveThisFolderItself)
|
if (saveThisFolderItself)
|
||||||
{
|
{
|
||||||
|
@ -249,7 +253,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
// Write out control file. This has to be done first so that subsequent loaders will see this file first
|
// Write out control file. This has to be done first so that subsequent loaders will see this file first
|
||||||
// XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
|
// XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
|
||||||
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
|
// not sure how to fix this though, short of going with a completely different file format.
|
||||||
|
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options));
|
||||||
m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive.");
|
m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive.");
|
||||||
|
|
||||||
if (inventoryFolder != null)
|
if (inventoryFolder != null)
|
||||||
|
@ -372,12 +377,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create the control file for a 0.1 version archive
|
/// Create the control file for the archive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="options"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string Create0p1ControlFile()
|
public static string CreateControlFile(Dictionary<string, object> options)
|
||||||
{
|
{
|
||||||
int majorVersion = 0, minorVersion = 1;
|
int majorVersion, minorVersion;
|
||||||
|
|
||||||
|
if (options.ContainsKey("profile"))
|
||||||
|
{
|
||||||
|
majorVersion = 1;
|
||||||
|
minorVersion = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
majorVersion = 0;
|
||||||
|
minorVersion = 1;
|
||||||
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion);
|
m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion);
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Enable or disable checking whether the iar user is actually logged in
|
/// Enable or disable checking whether the iar user is actually logged in
|
||||||
/// </value>
|
/// </value>
|
||||||
public bool DisablePresenceChecks { get; set; }
|
// public bool DisablePresenceChecks { get; set; }
|
||||||
|
|
||||||
public event InventoryArchiveSaved OnInventoryArchiveSaved;
|
public event InventoryArchiveSaved OnInventoryArchiveSaved;
|
||||||
|
|
||||||
|
@ -95,10 +95,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
public InventoryArchiverModule() {}
|
public InventoryArchiverModule() {}
|
||||||
|
|
||||||
public InventoryArchiverModule(bool disablePresenceChecks)
|
// public InventoryArchiverModule(bool disablePresenceChecks)
|
||||||
{
|
// {
|
||||||
DisablePresenceChecks = disablePresenceChecks;
|
// DisablePresenceChecks = disablePresenceChecks;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(Scene scene, IConfigSource source)
|
||||||
{
|
{
|
||||||
|
@ -172,8 +172,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
|
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
|
||||||
|
@ -189,13 +189,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,8 +212,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
|
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
|
||||||
|
@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,9 +257,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
|
|
||||||
InventoryArchiveReadRequest request;
|
InventoryArchiveReadRequest request;
|
||||||
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
||||||
|
|
||||||
|
@ -280,13 +279,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
|
m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
|
||||||
|
@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
InventoryArchiveReadRequest request;
|
InventoryArchiveReadRequest request;
|
||||||
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
||||||
|
|
||||||
|
@ -328,13 +327,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,28 +528,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Check if the given user is present in any of the scenes.
|
// /// Check if the given user is present in any of the scenes.
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
/// <param name="userId">The user to check</param>
|
// /// <param name="userId">The user to check</param>
|
||||||
/// <returns>true if the user is in any of the scenes, false otherwise</returns>
|
// /// <returns>true if the user is in any of the scenes, false otherwise</returns>
|
||||||
protected bool CheckPresence(UUID userId)
|
// protected bool CheckPresence(UUID userId)
|
||||||
{
|
// {
|
||||||
if (DisablePresenceChecks)
|
// if (DisablePresenceChecks)
|
||||||
return true;
|
// return true;
|
||||||
|
//
|
||||||
foreach (Scene scene in m_scenes.Values)
|
// foreach (Scene scene in m_scenes.Values)
|
||||||
{
|
// {
|
||||||
ScenePresence p;
|
// ScenePresence p;
|
||||||
if ((p = scene.GetScenePresence(userId)) != null)
|
// if ((p = scene.GetScenePresence(userId)) != null)
|
||||||
{
|
// {
|
||||||
p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
|
// p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
TestHelper.InMethod();
|
TestHelper.InMethod();
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
TestHelper.InMethod();
|
TestHelper.InMethod();
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
//log4net.Config.XmlConfigurator.Configure();
|
//log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
|
@ -443,7 +443,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
string humanEscapedItemName = @"You & you are a mean\/man\/";
|
string humanEscapedItemName = @"You & you are a mean\/man\/";
|
||||||
string userPassword = "meowfood";
|
string userPassword = "meowfood";
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
|
@ -619,7 +619,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
// MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
// MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
||||||
// SerialiserModule serialiserModule = new SerialiserModule();
|
// SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
// InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
// InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
// Scene scene = SceneSetupHelpers.SetupScene();
|
// Scene scene = SceneSetupHelpers.SetupScene();
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
#region Agent Arrived
|
#region Agent Arrived
|
||||||
public void AgentArrivedAtDestination(UUID id)
|
public void AgentArrivedAtDestination(UUID id)
|
||||||
{
|
{
|
||||||
//m_log.Debug(" >>> ReleaseAgent called <<< ");
|
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Agent {0} released", id);
|
||||||
ResetFromTransit(id);
|
ResetFromTransit(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
int width = 256;
|
int width = 256;
|
||||||
int height = 256;
|
int height = 256;
|
||||||
int alpha = 255; // 0 is transparent
|
int alpha = 255; // 0 is transparent
|
||||||
Color bgColour = Color.White; // Default background color
|
Color bgColor = Color.White; // Default background color
|
||||||
char altDataDelim = ';';
|
char altDataDelim = ';';
|
||||||
|
|
||||||
char[] paramDelimiter = { ',' };
|
char[] paramDelimiter = { ',' };
|
||||||
|
@ -253,15 +253,16 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
alpha = 256;
|
alpha = 256;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "bgcolor":
|
||||||
case "bgcolour":
|
case "bgcolour":
|
||||||
int hex = 0;
|
int hex = 0;
|
||||||
if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
|
if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
|
||||||
{
|
{
|
||||||
bgColour = Color.FromArgb(hex);
|
bgColor = Color.FromArgb(hex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bgColour = Color.FromName(value);
|
bgColor = Color.FromName(value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "altdatadelim":
|
case "altdatadelim":
|
||||||
|
@ -315,7 +316,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
// background color in their scripts, only do when fully opaque
|
// background color in their scripts, only do when fully opaque
|
||||||
if (alpha >= 255)
|
if (alpha >= 255)
|
||||||
{
|
{
|
||||||
graph.FillRectangle(new SolidBrush(bgColour), 0, 0, width, height);
|
graph.FillRectangle(new SolidBrush(bgColor), 0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int w = 0; w < bitmap.Width; w++)
|
for (int w = 0; w < bitmap.Width; w++)
|
||||||
|
@ -616,25 +617,25 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nextLine.StartsWith("PenColour"))
|
else if (nextLine.StartsWith("PenColour") || nextLine.StartsWith("PenColor"))
|
||||||
{
|
{
|
||||||
nextLine = nextLine.Remove(0, 9);
|
nextLine = nextLine.Remove(0, 9);
|
||||||
nextLine = nextLine.Trim();
|
nextLine = nextLine.Trim();
|
||||||
int hex = 0;
|
int hex = 0;
|
||||||
|
|
||||||
Color newColour;
|
Color newColor;
|
||||||
if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
|
if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
|
||||||
{
|
{
|
||||||
newColour = Color.FromArgb(hex);
|
newColor = Color.FromArgb(hex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// this doesn't fail, it just returns black if nothing is found
|
// this doesn't fail, it just returns black if nothing is found
|
||||||
newColour = Color.FromName(nextLine);
|
newColor = Color.FromName(nextLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
myBrush.Color = newColour;
|
myBrush.Color = newColor;
|
||||||
drawPen.Color = newColour;
|
drawPen.Color = newColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
{
|
{
|
||||||
public class RemoteGridServicesConnector :
|
public class RemoteGridServicesConnector : ISharedRegionModule, IGridService
|
||||||
GridServicesConnector, ISharedRegionModule, IGridService
|
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
|
@ -51,6 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
private bool m_Enabled = false;
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
private IGridService m_LocalGridService;
|
private IGridService m_LocalGridService;
|
||||||
|
private IGridService m_RemoteGridService;
|
||||||
|
|
||||||
public RemoteGridServicesConnector()
|
public RemoteGridServicesConnector()
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
get { return "RemoteGridServicesConnector"; }
|
get { return "RemoteGridServicesConnector"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["Modules"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
|
@ -97,9 +97,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Initialise(source);
|
|
||||||
|
|
||||||
m_LocalGridService = new LocalGridServicesConnector(source);
|
m_LocalGridService = new LocalGridServicesConnector(source);
|
||||||
|
m_RemoteGridService = new GridServicesConnector(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -135,61 +134,61 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
|
||||||
public override string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
||||||
{
|
{
|
||||||
string msg = m_LocalGridService.RegisterRegion(scopeID, regionInfo);
|
string msg = m_LocalGridService.RegisterRegion(scopeID, regionInfo);
|
||||||
|
|
||||||
if (msg == String.Empty)
|
if (msg == String.Empty)
|
||||||
return base.RegisterRegion(scopeID, regionInfo);
|
return m_RemoteGridService.RegisterRegion(scopeID, regionInfo);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool DeregisterRegion(UUID regionID)
|
public bool DeregisterRegion(UUID regionID)
|
||||||
{
|
{
|
||||||
if (m_LocalGridService.DeregisterRegion(regionID))
|
if (m_LocalGridService.DeregisterRegion(regionID))
|
||||||
return base.DeregisterRegion(regionID);
|
return m_RemoteGridService.DeregisterRegion(regionID);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
return base.GetNeighbours(scopeID, regionID);
|
return m_RemoteGridService.GetNeighbours(scopeID, regionID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
GridRegion rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID);
|
GridRegion rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID);
|
||||||
if (rinfo == null)
|
if (rinfo == null)
|
||||||
rinfo = base.GetRegionByUUID(scopeID, regionID);
|
rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID);
|
||||||
|
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||||
{
|
{
|
||||||
GridRegion rinfo = m_LocalGridService.GetRegionByPosition(scopeID, x, y);
|
GridRegion rinfo = m_LocalGridService.GetRegionByPosition(scopeID, x, y);
|
||||||
if (rinfo == null)
|
if (rinfo == null)
|
||||||
rinfo = base.GetRegionByPosition(scopeID, x, y);
|
rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y);
|
||||||
|
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override GridRegion GetRegionByName(UUID scopeID, string regionName)
|
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
||||||
{
|
{
|
||||||
GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName);
|
GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName);
|
||||||
if (rinfo == null)
|
if (rinfo == null)
|
||||||
rinfo = base.GetRegionByName(scopeID, regionName);
|
rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName);
|
||||||
|
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||||
{
|
{
|
||||||
List<GridRegion> rinfo = m_LocalGridService.GetRegionsByName(scopeID, name, maxNumber);
|
List<GridRegion> rinfo = m_LocalGridService.GetRegionsByName(scopeID, name, maxNumber);
|
||||||
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetRegionsByName {0} found {1} regions", name, rinfo.Count);
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetRegionsByName {0} found {1} regions", name, rinfo.Count);
|
||||||
List<GridRegion> grinfo = base.GetRegionsByName(scopeID, name, maxNumber);
|
List<GridRegion> grinfo = m_RemoteGridService.GetRegionsByName(scopeID, name, maxNumber);
|
||||||
|
|
||||||
if (grinfo != null)
|
if (grinfo != null)
|
||||||
{
|
{
|
||||||
|
@ -202,13 +201,79 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's not override GetRegionRange -- let's get them all from the grid server
|
public virtual List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
|
||||||
|
{
|
||||||
|
List<GridRegion> rinfo = m_LocalGridService.GetRegionRange(scopeID, xmin, xmax, ymin, ymax);
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetRegionRange {0} found {1} regions", name, rinfo.Count);
|
||||||
|
List<GridRegion> grinfo = m_RemoteGridService.GetRegionRange(scopeID, xmin, xmax, ymin, ymax);
|
||||||
|
|
||||||
public override int GetRegionFlags(UUID scopeID, UUID regionID)
|
if (grinfo != null)
|
||||||
|
{
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count);
|
||||||
|
foreach (GridRegion r in grinfo)
|
||||||
|
if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null)
|
||||||
|
rinfo.Add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GridRegion> GetDefaultRegions(UUID scopeID)
|
||||||
|
{
|
||||||
|
List<GridRegion> rinfo = m_LocalGridService.GetDefaultRegions(scopeID);
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetDefaultRegions {0} found {1} regions", name, rinfo.Count);
|
||||||
|
List<GridRegion> grinfo = m_RemoteGridService.GetDefaultRegions(scopeID);
|
||||||
|
|
||||||
|
if (grinfo != null)
|
||||||
|
{
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count);
|
||||||
|
foreach (GridRegion r in grinfo)
|
||||||
|
if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null)
|
||||||
|
rinfo.Add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y)
|
||||||
|
{
|
||||||
|
List<GridRegion> rinfo = m_LocalGridService.GetFallbackRegions(scopeID, x, y);
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetFallbackRegions {0} found {1} regions", name, rinfo.Count);
|
||||||
|
List<GridRegion> grinfo = m_RemoteGridService.GetFallbackRegions(scopeID, x, y);
|
||||||
|
|
||||||
|
if (grinfo != null)
|
||||||
|
{
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count);
|
||||||
|
foreach (GridRegion r in grinfo)
|
||||||
|
if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null)
|
||||||
|
rinfo.Add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GridRegion> GetHyperlinks(UUID scopeID)
|
||||||
|
{
|
||||||
|
List<GridRegion> rinfo = m_LocalGridService.GetHyperlinks(scopeID);
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetHyperlinks {0} found {1} regions", name, rinfo.Count);
|
||||||
|
List<GridRegion> grinfo = m_RemoteGridService.GetHyperlinks(scopeID);
|
||||||
|
|
||||||
|
if (grinfo != null)
|
||||||
|
{
|
||||||
|
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count);
|
||||||
|
foreach (GridRegion r in grinfo)
|
||||||
|
if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null)
|
||||||
|
rinfo.Add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetRegionFlags(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
int flags = m_LocalGridService.GetRegionFlags(scopeID, regionID);
|
int flags = m_LocalGridService.GetRegionFlags(scopeID, regionID);
|
||||||
if (flags == -1)
|
if (flags == -1)
|
||||||
flags = base.GetRegionFlags(scopeID, regionID);
|
flags = m_RemoteGridService.GetRegionFlags(scopeID, regionID);
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
|
m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
|
||||||
|
|
||||||
|
|
||||||
// Write out scene object metadata
|
// Write out scene object metadata
|
||||||
foreach (SceneObjectGroup sceneObject in m_sceneObjects)
|
foreach (SceneObjectGroup sceneObject in m_sceneObjects)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum major version of OAR that we can write.
|
/// The maximum major version of OAR that we can write.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int MAX_MAJOR_VERSION = 1;
|
public static int MAX_MAJOR_VERSION = 0;
|
||||||
|
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
protected Stream m_saveStream;
|
protected Stream m_saveStream;
|
||||||
|
@ -206,37 +206,37 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string CreateControlFile(Dictionary<string, object> options)
|
public static string CreateControlFile(Dictionary<string, object> options)
|
||||||
{
|
{
|
||||||
int majorVersion = MAX_MAJOR_VERSION, minorVersion = 0;
|
int majorVersion = MAX_MAJOR_VERSION, minorVersion = 5;
|
||||||
|
//
|
||||||
if (options.ContainsKey("version"))
|
// if (options.ContainsKey("version"))
|
||||||
{
|
// {
|
||||||
string[] parts = options["version"].ToString().Split('.');
|
// string[] parts = options["version"].ToString().Split('.');
|
||||||
if (parts.Length >= 1)
|
// if (parts.Length >= 1)
|
||||||
{
|
// {
|
||||||
majorVersion = Int32.Parse(parts[0]);
|
// majorVersion = Int32.Parse(parts[0]);
|
||||||
|
//
|
||||||
if (parts.Length >= 2)
|
// if (parts.Length >= 2)
|
||||||
minorVersion = Int32.Parse(parts[1]);
|
// minorVersion = Int32.Parse(parts[1]);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION)
|
// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION)
|
||||||
{
|
// {
|
||||||
throw new Exception(
|
// throw new Exception(
|
||||||
string.Format(
|
// string.Format(
|
||||||
"OAR version number for save must be between {0} and {1}",
|
// "OAR version number for save must be between {0} and {1}",
|
||||||
MIN_MAJOR_VERSION, MAX_MAJOR_VERSION));
|
// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION));
|
||||||
}
|
// }
|
||||||
else if (majorVersion == MAX_MAJOR_VERSION)
|
// else if (majorVersion == MAX_MAJOR_VERSION)
|
||||||
{
|
// {
|
||||||
// Force 1.0
|
// // Force 1.0
|
||||||
minorVersion = 0;
|
// minorVersion = 0;
|
||||||
}
|
// }
|
||||||
else if (majorVersion == MIN_MAJOR_VERSION)
|
// else if (majorVersion == MIN_MAJOR_VERSION)
|
||||||
{
|
// {
|
||||||
// Force 0.4
|
// // Force 0.4
|
||||||
minorVersion = 4;
|
// minorVersion = 4;
|
||||||
}
|
// }
|
||||||
|
|
||||||
m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
|
m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
|
||||||
//if (majorVersion == 1)
|
//if (majorVersion == 1)
|
||||||
|
|
|
@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
Dictionary<string, object> options = new Dictionary<string, object>();
|
Dictionary<string, object> options = new Dictionary<string, object>();
|
||||||
|
|
||||||
OptionSet ops = new OptionSet();
|
OptionSet ops = new OptionSet();
|
||||||
ops.Add("v|version=", delegate(string v) { options["version"] = v; });
|
// ops.Add("v|version=", delegate(string v) { options["version"] = v; });
|
||||||
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
|
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
|
||||||
|
|
||||||
List<string> mainParams = ops.Parse(cmdparams);
|
List<string> mainParams = ops.Parse(cmdparams);
|
||||||
|
|
|
@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
client.OnParcelSelectObjects += ClientOnParcelSelectObjects;
|
client.OnParcelSelectObjects += ClientOnParcelSelectObjects;
|
||||||
client.OnParcelObjectOwnerRequest += ClientOnParcelObjectOwnerRequest;
|
client.OnParcelObjectOwnerRequest += ClientOnParcelObjectOwnerRequest;
|
||||||
client.OnParcelAccessListRequest += ClientOnParcelAccessListRequest;
|
client.OnParcelAccessListRequest += ClientOnParcelAccessListRequest;
|
||||||
client.OnParcelAccessListUpdateRequest += ClientOnParcelAccessUpdateListRequest;
|
client.OnParcelAccessListUpdateRequest += ClientOnParcelAccessListUpdateRequest;
|
||||||
client.OnParcelAbandonRequest += ClientOnParcelAbandonRequest;
|
client.OnParcelAbandonRequest += ClientOnParcelAbandonRequest;
|
||||||
client.OnParcelGodForceOwner += ClientOnParcelGodForceOwner;
|
client.OnParcelGodForceOwner += ClientOnParcelGodForceOwner;
|
||||||
client.OnParcelReclaim += ClientOnParcelReclaim;
|
client.OnParcelReclaim += ClientOnParcelReclaim;
|
||||||
|
@ -508,14 +508,22 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
if (land != null)
|
if (land != null)
|
||||||
{
|
{
|
||||||
m_landList[landLocalID].SendAccessList(agentID, sessionID, flags, sequenceID, remote_client);
|
land.SendAccessList(agentID, sessionID, flags, sequenceID, remote_client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClientOnParcelAccessUpdateListRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
|
public void ClientOnParcelAccessListUpdateRequest(UUID agentID,
|
||||||
List<ParcelManager.ParcelAccessEntry> entries,
|
uint flags, int landLocalID, UUID transactionID, int sequenceID,
|
||||||
IClientAPI remote_client)
|
int sections, List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
|
IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
|
// Flags is the list to update, it can mean either the ban or
|
||||||
|
// the access list (WTH is a pass list? Mentioned in ParcelFlags)
|
||||||
|
//
|
||||||
|
// There may be multiple packets, because these can get LONG.
|
||||||
|
// Use transactionID to determine a new chain of packets since
|
||||||
|
// packets may have come in out of sequence and that would be
|
||||||
|
// a big mess if using the sequenceID
|
||||||
ILandObject land;
|
ILandObject land;
|
||||||
lock (m_landList)
|
lock (m_landList)
|
||||||
{
|
{
|
||||||
|
@ -524,9 +532,15 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
if (land != null)
|
if (land != null)
|
||||||
{
|
{
|
||||||
if (agentID == land.LandData.OwnerID)
|
GroupPowers requiredPowers = GroupPowers.LandManageAllowed;
|
||||||
|
if (flags == (uint)AccessList.Ban)
|
||||||
|
requiredPowers = GroupPowers.LandManageBanned;
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(agentID,
|
||||||
|
land, requiredPowers))
|
||||||
{
|
{
|
||||||
land.UpdateAccessList(flags, entries, remote_client);
|
land.UpdateAccessList(flags, transactionID, sequenceID,
|
||||||
|
sections, entries, remote_client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -854,7 +868,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
//If we are still here, then they are subdividing within one piece of land
|
//If we are still here, then they are subdividing within one piece of land
|
||||||
//Check owner
|
//Check owner
|
||||||
if (!m_scene.Permissions.CanEditParcel(attempting_user_id, startLandObject))
|
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +936,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!m_scene.Permissions.CanEditParcel(attempting_user_id, masterLandObject))
|
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1570,7 +1584,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
if (land == null) return;
|
if (land == null) return;
|
||||||
|
|
||||||
if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land))
|
if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
land.LandData.OtherCleanTime = otherCleanTime;
|
land.LandData.OtherCleanTime = otherCleanTime;
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
protected LandData m_landData = new LandData();
|
protected LandData m_landData = new LandData();
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
|
protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
|
||||||
|
protected Dictionary<uint, UUID> m_listTransactions = new Dictionary<uint, UUID>();
|
||||||
|
|
||||||
public bool[,] LandBitmap
|
public bool[,] LandBitmap
|
||||||
{
|
{
|
||||||
|
@ -199,36 +200,81 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
|
public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this))
|
//Needs later group support
|
||||||
{
|
bool snap_selection = false;
|
||||||
//Needs later group support
|
LandData newData = LandData.Copy();
|
||||||
bool snap_selection = false;
|
|
||||||
LandData newData = LandData.Copy();
|
|
||||||
|
|
||||||
if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
|
uint allowedDelta = 0;
|
||||||
|
|
||||||
|
// These two are always blocked as no client can set them anyway
|
||||||
|
// ParcelFlags.ForSaleObjects
|
||||||
|
// ParcelFlags.LindenHome
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||||
|
{
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.AllowLandmark |
|
||||||
|
ParcelFlags.AllowTerraform |
|
||||||
|
ParcelFlags.AllowDamage |
|
||||||
|
ParcelFlags.CreateObjects |
|
||||||
|
ParcelFlags.RestrictPushObject |
|
||||||
|
ParcelFlags.AllowGroupScripts |
|
||||||
|
ParcelFlags.CreateGroupObjects |
|
||||||
|
ParcelFlags.AllowAPrimitiveEntry |
|
||||||
|
ParcelFlags.AllowGroupObjectEntry);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale))
|
||||||
|
{
|
||||||
|
if (args.AuthBuyerID != newData.AuthBuyerID ||
|
||||||
|
args.SalePrice != newData.SalePrice)
|
||||||
{
|
{
|
||||||
if (m_scene.Permissions.CanSellParcel(remote_client.AgentId, this))
|
snap_selection = true;
|
||||||
{
|
|
||||||
newData.AuthBuyerID = args.AuthBuyerID;
|
|
||||||
newData.SalePrice = args.SalePrice;
|
|
||||||
snap_selection = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newData.AuthBuyerID = args.AuthBuyerID;
|
||||||
|
newData.SalePrice = args.SalePrice;
|
||||||
|
|
||||||
|
if (!LandData.IsGroupOwned)
|
||||||
|
{
|
||||||
|
newData.GroupID = args.GroupID;
|
||||||
|
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.AllowDeedToGroup |
|
||||||
|
ParcelFlags.ContributeWithDeed |
|
||||||
|
ParcelFlags.SellParcelObjects);
|
||||||
|
}
|
||||||
|
|
||||||
|
allowedDelta |= (uint)ParcelFlags.ForSale;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces))
|
||||||
|
{
|
||||||
newData.Category = args.Category;
|
newData.Category = args.Category;
|
||||||
|
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.ShowDirectory |
|
||||||
|
ParcelFlags.AllowPublish |
|
||||||
|
ParcelFlags.MaturePublish);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity))
|
||||||
|
{
|
||||||
newData.Description = args.Desc;
|
newData.Description = args.Desc;
|
||||||
newData.GroupID = args.GroupID;
|
newData.Name = args.Name;
|
||||||
|
newData.SnapshotID = args.SnapshotID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint))
|
||||||
|
{
|
||||||
newData.LandingType = args.LandingType;
|
newData.LandingType = args.LandingType;
|
||||||
|
newData.UserLocation = args.UserLocation;
|
||||||
|
newData.UserLookAt = args.UserLookAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia))
|
||||||
|
{
|
||||||
newData.MediaAutoScale = args.MediaAutoScale;
|
newData.MediaAutoScale = args.MediaAutoScale;
|
||||||
newData.MediaID = args.MediaID;
|
newData.MediaID = args.MediaID;
|
||||||
newData.MediaURL = args.MediaURL;
|
newData.MediaURL = args.MediaURL;
|
||||||
newData.MusicURL = args.MusicURL;
|
newData.MusicURL = args.MusicURL;
|
||||||
newData.Name = args.Name;
|
|
||||||
newData.Flags = args.ParcelFlags;
|
|
||||||
newData.PassHours = args.PassHours;
|
|
||||||
newData.PassPrice = args.PassPrice;
|
|
||||||
newData.SnapshotID = args.SnapshotID;
|
|
||||||
newData.UserLocation = args.UserLocation;
|
|
||||||
newData.UserLookAt = args.UserLookAt;
|
|
||||||
newData.MediaType = args.MediaType;
|
newData.MediaType = args.MediaType;
|
||||||
newData.MediaDescription = args.MediaDescription;
|
newData.MediaDescription = args.MediaDescription;
|
||||||
newData.MediaWidth = args.MediaWidth;
|
newData.MediaWidth = args.MediaWidth;
|
||||||
|
@ -237,10 +283,40 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
newData.ObscureMusic = args.ObscureMusic;
|
newData.ObscureMusic = args.ObscureMusic;
|
||||||
newData.ObscureMedia = args.ObscureMedia;
|
newData.ObscureMedia = args.ObscureMedia;
|
||||||
|
|
||||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
allowedDelta |= (uint)(ParcelFlags.SoundLocal |
|
||||||
|
ParcelFlags.UrlWebPage |
|
||||||
SendLandUpdateToAvatarsOverMe(snap_selection);
|
ParcelFlags.UrlRawHtml |
|
||||||
|
ParcelFlags.AllowVoiceChat |
|
||||||
|
ParcelFlags.UseEstateVoiceChan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses))
|
||||||
|
{
|
||||||
|
newData.PassHours = args.PassHours;
|
||||||
|
newData.PassPrice = args.PassPrice;
|
||||||
|
|
||||||
|
allowedDelta |= (uint)ParcelFlags.UsePassList;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed))
|
||||||
|
{
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.UseAccessGroup |
|
||||||
|
ParcelFlags.UseAccessList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned))
|
||||||
|
{
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.UseBanList |
|
||||||
|
ParcelFlags.DenyAnonymous |
|
||||||
|
ParcelFlags.DenyAgeUnverified);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint preserve = LandData.Flags & ~allowedDelta;
|
||||||
|
newData.Flags = preserve | (args.ParcelFlags & allowedDelta);
|
||||||
|
|
||||||
|
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||||
|
|
||||||
|
SendLandUpdateToAvatarsOverMe(snap_selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
|
public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
|
||||||
|
@ -295,14 +371,14 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
|
if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
if (LandData.ParcelAccessList.FindIndex(
|
||||||
entry.AgentID = avatar;
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
entry.Flags = AccessList.Ban;
|
{
|
||||||
entry.Time = new DateTime();
|
if (e.AgentID == avatar && e.Flags == AccessList.Ban)
|
||||||
//See if they are on the list, but make sure the owner isn't banned
|
return true;
|
||||||
if (LandData.ParcelAccessList.Contains(entry) && LandData.OwnerID != avatar)
|
return false;
|
||||||
|
}) != -1 && LandData.OwnerID != avatar)
|
||||||
{
|
{
|
||||||
//They are banned, so lets send them a notice about this parcel
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,15 +392,14 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) > 0)
|
if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) > 0)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
if (LandData.ParcelAccessList.FindIndex(
|
||||||
entry.AgentID = avatar;
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
entry.Flags = AccessList.Access;
|
{
|
||||||
entry.Time = new DateTime();
|
if (e.AgentID == avatar && e.Flags == AccessList.Access)
|
||||||
|
return true;
|
||||||
//If they are not on the access list and are not the owner
|
return false;
|
||||||
if (!LandData.ParcelAccessList.Contains(entry) && LandData.OwnerID != avatar)
|
}) == -1 && LandData.OwnerID != avatar)
|
||||||
{
|
{
|
||||||
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -421,39 +496,52 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
|
public void UpdateAccessList(uint flags, UUID transactionID,
|
||||||
|
int sequenceID, int sections,
|
||||||
|
List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
|
IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
LandData newData = LandData.Copy();
|
LandData newData = LandData.Copy();
|
||||||
|
|
||||||
if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
|
if ((!m_listTransactions.ContainsKey(flags)) ||
|
||||||
|
m_listTransactions[flags] != transactionID)
|
||||||
{
|
{
|
||||||
entries.Clear();
|
m_listTransactions[flags] = transactionID;
|
||||||
}
|
|
||||||
|
|
||||||
List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
|
List<ParcelManager.ParcelAccessEntry> toRemove =
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
new List<ParcelManager.ParcelAccessEntry>();
|
||||||
{
|
|
||||||
if (entry.Flags == (AccessList)flags)
|
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
||||||
{
|
{
|
||||||
toRemove.Add(entry);
|
if (entry.Flags == (AccessList)flags)
|
||||||
|
toRemove.Add(entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
||||||
|
{
|
||||||
|
newData.ParcelAccessList.Remove(entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checked here because this will always be the first
|
||||||
|
// and only packet in a transaction
|
||||||
|
if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
|
||||||
|
{
|
||||||
|
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
|
||||||
{
|
|
||||||
newData.ParcelAccessList.Remove(entry);
|
|
||||||
}
|
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in entries)
|
foreach (ParcelManager.ParcelAccessEntry entry in entries)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry temp =
|
||||||
|
new ParcelManager.ParcelAccessEntry();
|
||||||
|
|
||||||
temp.AgentID = entry.AgentID;
|
temp.AgentID = entry.AgentID;
|
||||||
temp.Time = new DateTime(); //Pointless? Yes.
|
temp.Time = entry.Time;
|
||||||
temp.Flags = (AccessList)flags;
|
temp.Flags = (AccessList)flags;
|
||||||
|
|
||||||
if (!newData.ParcelAccessList.Contains(temp))
|
newData.ParcelAccessList.Add(temp);
|
||||||
{
|
|
||||||
newData.ParcelAccessList.Add(temp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||||
|
@ -711,7 +799,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
|
public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||||
{
|
{
|
||||||
List<uint> resultLocalIDs = new List<uint>();
|
List<uint> resultLocalIDs = new List<uint>();
|
||||||
try
|
try
|
||||||
|
@ -761,7 +849,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
/// </param>
|
/// </param>
|
||||||
public void SendLandObjectOwners(IClientAPI remote_client)
|
public void SendLandObjectOwners(IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||||
{
|
{
|
||||||
Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
|
Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
|
||||||
List<UUID> groups = new List<UUID>();
|
List<UUID> groups = new List<UUID>();
|
||||||
|
|
|
@ -37,56 +37,6 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
// Temporary fix of wrong GroupPowers constants in OpenMetaverse library
|
|
||||||
enum GroupPowers : long
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
LandEjectAndFreeze = 1,
|
|
||||||
Invite = 2,
|
|
||||||
ReturnGroupSet = 2,
|
|
||||||
Eject = 4,
|
|
||||||
ReturnNonGroup = 4,
|
|
||||||
ChangeOptions = 8,
|
|
||||||
LandGardening = 8,
|
|
||||||
CreateRole = 16,
|
|
||||||
DeedObject = 16,
|
|
||||||
ModerateChat = 32,
|
|
||||||
DeleteRole = 32,
|
|
||||||
RoleProperties = 64,
|
|
||||||
ObjectManipulate = 64,
|
|
||||||
ObjectSetForSale = 128,
|
|
||||||
AssignMemberLimited = 128,
|
|
||||||
AssignMember = 256,
|
|
||||||
Accountable = 256,
|
|
||||||
RemoveMember = 512,
|
|
||||||
SendNotices = 1024,
|
|
||||||
ChangeActions = 1024,
|
|
||||||
ChangeIdentity = 2048,
|
|
||||||
ReceiveNotices = 2048,
|
|
||||||
StartProposal = 4096,
|
|
||||||
LandDeed = 4096,
|
|
||||||
VoteOnProposal = 8192,
|
|
||||||
LandRelease = 8192,
|
|
||||||
LandSetSale = 16384,
|
|
||||||
LandDivideJoin = 32768,
|
|
||||||
ReturnGroupOwned = 65536,
|
|
||||||
JoinChat = 65536,
|
|
||||||
FindPlaces = 131072,
|
|
||||||
LandChangeIdentity = 262144,
|
|
||||||
SetLandingPoint = 524288,
|
|
||||||
ChangeMedia = 1048576,
|
|
||||||
LandEdit = 2097152,
|
|
||||||
LandOptions = 4194304,
|
|
||||||
AllowEditLand = 8388608,
|
|
||||||
AllowFly = 16777216,
|
|
||||||
AllowRez = 33554432,
|
|
||||||
AllowLandmark = 67108864,
|
|
||||||
AllowVoiceChat = 134217728,
|
|
||||||
AllowSetHome = 268435456,
|
|
||||||
LandManageAllowed = 536870912,
|
|
||||||
LandManageBanned = 1073741824
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Permissions
|
namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
{
|
{
|
||||||
public class PermissionsModule : IRegionModule
|
public class PermissionsModule : IRegionModule
|
||||||
|
@ -214,7 +164,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||||
m_scene.Permissions.OnEditObject += CanEditObject; //MAYBE FULLY IMPLEMENTED
|
m_scene.Permissions.OnEditObject += CanEditObject; //MAYBE FULLY IMPLEMENTED
|
||||||
m_scene.Permissions.OnEditParcel += CanEditParcel; //MAYBE FULLY IMPLEMENTED
|
m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; //MAYBE FULLY IMPLEMENTED
|
||||||
m_scene.Permissions.OnInstantMessage += CanInstantMessage;
|
m_scene.Permissions.OnInstantMessage += CanInstantMessage;
|
||||||
m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; //NOT YET IMPLEMENTED
|
m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; //NOT YET IMPLEMENTED
|
||||||
m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; //FULLY IMPLEMENTED
|
m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; //FULLY IMPLEMENTED
|
||||||
|
@ -1005,12 +955,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return GenericObjectPermission(editorID, objectID, false);
|
return GenericObjectPermission(editorID, objectID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
|
private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene)
|
||||||
{
|
{
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDivideJoin);
|
return GenericParcelOwnerPermission(user, parcel, (ulong)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -93,13 +93,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to fetch from GridServer
|
// try to fetch from GridServer
|
||||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(UUID.Zero, mapName, 20);
|
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||||
if (regionInfos == null)
|
if (regionInfos == null)
|
||||||
{
|
{
|
||||||
m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?");
|
m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?");
|
||||||
// service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region
|
// service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region
|
||||||
regionInfos = new List<GridRegion>();
|
regionInfos = new List<GridRegion>();
|
||||||
GridRegion info = m_scene.GridService.GetRegionByName(UUID.Zero, mapName);
|
GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName);
|
||||||
if (info != null) regionInfos.Add(info);
|
if (info != null) regionInfos.Add(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.Remoting.Messaging;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -413,11 +414,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int nAsyncRequests = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processing thread main() loop for doing remote mapitem requests
|
/// Processing thread main() loop for doing remote mapitem requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void process()
|
public void process()
|
||||||
{
|
{
|
||||||
|
const int MAX_ASYNC_REQUESTS = 20;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
|
@ -437,10 +440,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
dorequest = false;
|
dorequest = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dorequest)
|
if (dorequest && !m_blacklistedregions.ContainsKey(st.regionhandle))
|
||||||
{
|
{
|
||||||
OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
|
while (nAsyncRequests >= MAX_ASYNC_REQUESTS) // hit the break
|
||||||
RequestMapItemsCompleted(response);
|
Thread.Sleep(80);
|
||||||
|
|
||||||
|
RequestMapItemsDelegate d = RequestMapItemsAsync;
|
||||||
|
d.BeginInvoke(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle, RequestMapItemsCompleted, null);
|
||||||
|
//OSDMap response = RequestMapItemsAsync(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
|
||||||
|
//RequestMapItemsCompleted(response);
|
||||||
|
Interlocked.Increment(ref nAsyncRequests);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,8 +478,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
/// Sends the mapitem response to the IClientAPI
|
/// Sends the mapitem response to the IClientAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="response">The OSDMap Response for the mapitem</param>
|
/// <param name="response">The OSDMap Response for the mapitem</param>
|
||||||
private void RequestMapItemsCompleted(OSDMap response)
|
private void RequestMapItemsCompleted(IAsyncResult iar)
|
||||||
{
|
{
|
||||||
|
AsyncResult result = (AsyncResult)iar;
|
||||||
|
RequestMapItemsDelegate icon = (RequestMapItemsDelegate)result.AsyncDelegate;
|
||||||
|
|
||||||
|
OSDMap response = (OSDMap)icon.EndInvoke(iar);
|
||||||
|
|
||||||
|
Interlocked.Decrement(ref nAsyncRequests);
|
||||||
|
|
||||||
|
if (!response.ContainsKey("requestID"))
|
||||||
|
return;
|
||||||
|
|
||||||
UUID requestID = response["requestID"].AsUUID();
|
UUID requestID = response["requestID"].AsUUID();
|
||||||
|
|
||||||
if (requestID != UUID.Zero)
|
if (requestID != UUID.Zero)
|
||||||
|
@ -538,6 +557,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
EnqueueMapItemRequest(st);
|
EnqueueMapItemRequest(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private delegate OSDMap RequestMapItemsDelegate(UUID id, uint flags,
|
||||||
|
uint EstateID, bool godlike, uint itemtype, ulong regionhandle);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Does the actual remote mapitem request
|
/// Does the actual remote mapitem request
|
||||||
/// This should be called from an asynchronous thread
|
/// This should be called from an asynchronous thread
|
||||||
|
@ -552,9 +573,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
/// <param name="itemtype">passed in from packet</param>
|
/// <param name="itemtype">passed in from packet</param>
|
||||||
/// <param name="regionhandle">Region we're looking up</param>
|
/// <param name="regionhandle">Region we're looking up</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
|
private OSDMap RequestMapItemsAsync(UUID id, uint flags,
|
||||||
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
||||||
{
|
{
|
||||||
|
string httpserver = "";
|
||||||
bool blacklisted = false;
|
bool blacklisted = false;
|
||||||
lock (m_blacklistedregions)
|
lock (m_blacklistedregions)
|
||||||
{
|
{
|
||||||
|
@ -593,7 +615,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
m_blacklistedregions.Add(regionhandle, Environment.TickCount);
|
m_blacklistedregions.Add(regionhandle, Environment.TickCount);
|
||||||
}
|
}
|
||||||
m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString());
|
//m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,7 +660,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
os = mapitemsrequest.GetRequestStream();
|
os = mapitemsrequest.GetRequestStream();
|
||||||
os.Write(buffer, 0, buffer.Length); //Send it
|
os.Write(buffer, 0, buffer.Length); //Send it
|
||||||
os.Close();
|
os.Close();
|
||||||
//m_log.DebugFormat("[WORLD MAP]: Getting MapItems from Sim {0}", httpserver);
|
//m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver);
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
|
@ -654,15 +676,22 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[WORLD MAP]: RequestMapItems failed for {0}", httpserver);
|
||||||
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
return responseMap;
|
||||||
|
}
|
||||||
|
|
||||||
string response_mapItems_reply = null;
|
string response_mapItems_reply = null;
|
||||||
{ // get the response
|
{ // get the response
|
||||||
|
StreamReader sr = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebResponse webResponse = mapitemsrequest.GetResponse();
|
WebResponse webResponse = mapitemsrequest.GetResponse();
|
||||||
if (webResponse != null)
|
if (webResponse != null)
|
||||||
{
|
{
|
||||||
StreamReader sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
response_mapItems_reply = sr.ReadToEnd().Trim();
|
response_mapItems_reply = sr.ReadToEnd().Trim();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -683,6 +712,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[WORLD MAP]: RequestMapItems failed for {0}", httpserver);
|
||||||
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
lock (m_blacklistedregions)
|
||||||
|
{
|
||||||
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
|
m_blacklistedregions.Add(regionhandle, Environment.TickCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
return responseMap;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (sr != null)
|
||||||
|
sr.Close();
|
||||||
|
}
|
||||||
|
|
||||||
OSD rezResponse = null;
|
OSD rezResponse = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -691,14 +738,29 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
responseMap = (OSDMap)rezResponse;
|
responseMap = (OSDMap)rezResponse;
|
||||||
responseMap["requestID"] = OSD.FromUUID(requestID);
|
responseMap["requestID"] = OSD.FromUUID(requestID);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
|
m_log.InfoFormat("[WORLD MAP]: exception on parse of RequestMapItems reply from {0}: {1}", httpserver, ex.Message);
|
||||||
responseMap["connect"] = OSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
lock (m_blacklistedregions)
|
||||||
|
{
|
||||||
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
|
m_blacklistedregions.Add(regionhandle, Environment.TickCount);
|
||||||
|
}
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!responseMap.ContainsKey(itemtype.ToString())) // remote sim doesnt have the stated region handle
|
||||||
|
{
|
||||||
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting.");
|
||||||
|
m_blacklistedregions.Add(regionhandle, Environment.TickCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,14 +113,17 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the user inventory to show a detach.
|
/// Update the user inventory to show a detach.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemID">
|
/// <param name="itemID">/param>
|
||||||
/// A <see cref="UUID"/>
|
/// <param name="remoteClient"></param>
|
||||||
/// </param>
|
|
||||||
/// <param name="remoteClient">
|
|
||||||
/// A <see cref="IClientAPI"/>
|
|
||||||
/// </param>
|
|
||||||
void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient);
|
void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update the position of an attachment.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sog"></param>
|
||||||
|
/// <param name="pos"></param>
|
||||||
|
void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the user inventory with a changed attachment
|
/// Update the user inventory with a changed attachment
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
||||||
List<UUID> CreateAccessListArrayByFlag(AccessList flag);
|
List<UUID> CreateAccessListArrayByFlag(AccessList flag);
|
||||||
void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
|
void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
|
||||||
void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
|
void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
|
||||||
void UpdateLandBitmapByteArray();
|
void UpdateLandBitmapByteArray();
|
||||||
void SetLandBitmapFromByteArray();
|
void SetLandBitmapFromByteArray();
|
||||||
bool[,] GetLandBitmap();
|
bool[,] GetLandBitmap();
|
||||||
|
|
|
@ -233,6 +233,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
// Falling long enough to trigger the animation
|
// Falling long enough to trigger the animation
|
||||||
return "FALLDOWN";
|
return "FALLDOWN";
|
||||||
}
|
}
|
||||||
|
else if (m_animTickJump == -1)
|
||||||
|
{
|
||||||
|
m_animTickJump = 0;
|
||||||
|
return "STAND";
|
||||||
|
}
|
||||||
|
|
||||||
return m_movementAnimation;
|
return m_movementAnimation;
|
||||||
}
|
}
|
||||||
|
@ -279,6 +284,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
m_animTickJump = -1;
|
m_animTickJump = -1;
|
||||||
return "JUMP";
|
return "JUMP";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return "JUMP";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -307,7 +314,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
|
|
||||||
#endregion Ground Movement
|
#endregion Ground Movement
|
||||||
|
|
||||||
return m_movementAnimation;
|
//return m_movementAnimation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -316,16 +323,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
public void UpdateMovementAnimations()
|
public void UpdateMovementAnimations()
|
||||||
{
|
{
|
||||||
m_movementAnimation = GetMovementAnimation();
|
m_movementAnimation = GetMovementAnimation();
|
||||||
|
TrySetMovementAnimation(m_movementAnimation);
|
||||||
if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump)
|
|
||||||
{
|
|
||||||
// This was the previous behavior before PREJUMP
|
|
||||||
TrySetMovementAnimation("JUMP");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TrySetMovementAnimation(m_movementAnimation);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID[] GetAnimationArray()
|
public UUID[] GetAnimationArray()
|
||||||
|
|
|
@ -218,20 +218,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
|
private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
|
||||||
{
|
{
|
||||||
|
// If this is an update for our own avatar give it the highest priority
|
||||||
|
if (client.AgentId == entity.UUID)
|
||||||
|
return 0.0;
|
||||||
|
if (entity == null)
|
||||||
|
return double.NaN;
|
||||||
|
|
||||||
|
// Use group position for child prims
|
||||||
|
Vector3 entityPos = entity.AbsolutePosition;
|
||||||
|
if (entity is SceneObjectPart)
|
||||||
|
{
|
||||||
|
SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup;
|
||||||
|
if (group != null)
|
||||||
|
entityPos = group.AbsolutePosition;
|
||||||
|
else
|
||||||
|
entityPos = entity.AbsolutePosition;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
entityPos = entity.AbsolutePosition;
|
||||||
|
|
||||||
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
|
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
{
|
{
|
||||||
// If this is an update for our own avatar give it the highest priority
|
|
||||||
if (presence == entity)
|
|
||||||
return 0.0;
|
|
||||||
|
|
||||||
// Use group position for child prims
|
|
||||||
Vector3 entityPos = entity.AbsolutePosition;
|
|
||||||
if (entity is SceneObjectPart)
|
|
||||||
entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
|
|
||||||
else
|
|
||||||
entityPos = entity.AbsolutePosition;
|
|
||||||
|
|
||||||
if (!presence.IsChildAgent)
|
if (!presence.IsChildAgent)
|
||||||
{
|
{
|
||||||
if (entity is ScenePresence)
|
if (entity is ScenePresence)
|
||||||
|
|
|
@ -68,6 +68,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate bool IsGodHandler(UUID user, Scene requestFromScene);
|
public delegate bool IsGodHandler(UUID user, Scene requestFromScene);
|
||||||
public delegate bool IsAdministratorHandler(UUID user);
|
public delegate bool IsAdministratorHandler(UUID user);
|
||||||
public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
|
public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene);
|
||||||
public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
|
@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event IsGodHandler OnIsGod;
|
public event IsGodHandler OnIsGod;
|
||||||
public event IsAdministratorHandler OnIsAdministrator;
|
public event IsAdministratorHandler OnIsAdministrator;
|
||||||
public event EditParcelHandler OnEditParcel;
|
public event EditParcelHandler OnEditParcel;
|
||||||
|
public event EditParcelPropertiesHandler OnEditParcelProperties;
|
||||||
public event SellParcelHandler OnSellParcel;
|
public event SellParcelHandler OnSellParcel;
|
||||||
public event AbandonParcelHandler OnAbandonParcel;
|
public event AbandonParcelHandler OnAbandonParcel;
|
||||||
public event ReclaimParcelHandler OnReclaimParcel;
|
public event ReclaimParcelHandler OnReclaimParcel;
|
||||||
|
@ -720,15 +722,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region EDIT PARCEL
|
#region EDIT PARCEL
|
||||||
public bool CanEditParcel(UUID user, ILandObject parcel)
|
|
||||||
|
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p)
|
||||||
{
|
{
|
||||||
EditParcelHandler handler = OnEditParcel;
|
EditParcelPropertiesHandler handler = OnEditParcelProperties;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
Delegate[] list = handler.GetInvocationList();
|
Delegate[] list = handler.GetInvocationList();
|
||||||
foreach (EditParcelHandler h in list)
|
foreach (EditParcelPropertiesHandler h in list)
|
||||||
{
|
{
|
||||||
if (h(user, parcel, m_scene) == false)
|
if (h(user, parcel, p, m_scene) == false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
|
SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
|
||||||
if (sop != null)
|
if (sop != null)
|
||||||
{
|
{
|
||||||
coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition);
|
coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition);
|
||||||
avatarUUIDs.Add(sp.UUID);
|
avatarUUIDs.Add(sp.UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1281,13 +1281,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
|
if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
|
||||||
{
|
{
|
||||||
// Set the new attachment point data in the object
|
if (m_parentScene.AttachmentsModule != null)
|
||||||
byte attachmentPoint = group.GetAttachmentPoint();
|
m_parentScene.AttachmentsModule.UpdateAttachmentPosition(group, pos);
|
||||||
group.UpdateGroupPosition(pos);
|
|
||||||
group.RootPart.IsAttachment = false;
|
|
||||||
group.AbsolutePosition = group.RootPart.AttachedPos;
|
|
||||||
group.SetAttachmentPoint(attachmentPoint);
|
|
||||||
group.HasGroupChanged = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3251,13 +3251,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAvatarOnSitTarget(UUID avatarID)
|
|
||||||
{
|
|
||||||
m_sitTargetAvatar = avatarID;
|
|
||||||
if (ParentGroup != null)
|
|
||||||
ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetAxisRotation(int axis, int rotate)
|
public void SetAxisRotation(int axis, int rotate)
|
||||||
{
|
{
|
||||||
if (m_parentGroup != null)
|
if (m_parentGroup != null)
|
||||||
|
|
|
@ -1703,7 +1703,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
// Reset sit target.
|
// Reset sit target.
|
||||||
if (part.GetAvatarOnSitTarget() == UUID)
|
if (part.GetAvatarOnSitTarget() == UUID)
|
||||||
part.SetAvatarOnSitTarget(UUID.Zero);
|
part.SitTargetAvatar = UUID.Zero;
|
||||||
|
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
m_parentPosition = part.GetWorldPosition();
|
m_parentPosition = part.GetWorldPosition();
|
||||||
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
||||||
|
@ -1807,11 +1808,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (SitTargetisSet && SitTargetUnOccupied)
|
if (SitTargetisSet && SitTargetUnOccupied)
|
||||||
{
|
{
|
||||||
part.SetAvatarOnSitTarget(UUID);
|
part.SitTargetAvatar = UUID;
|
||||||
offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
|
offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
|
||||||
sitOrientation = avSitOrientation;
|
sitOrientation = avSitOrientation;
|
||||||
autopilot = false;
|
autopilot = false;
|
||||||
}
|
}
|
||||||
|
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
pos = part.AbsolutePosition + offset;
|
pos = part.AbsolutePosition + offset;
|
||||||
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
||||||
|
@ -2225,33 +2227,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// WHAT???
|
// WHAT???
|
||||||
m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!");
|
m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!");
|
||||||
|
|
||||||
// we have to reset the user's child agent connections.
|
|
||||||
// Likely, here they've lost the eventqueue for other regions so border
|
|
||||||
// crossings will fail at this point unless we reset them.
|
|
||||||
|
|
||||||
List<ulong> regions = new List<ulong>(KnownChildRegionHandles);
|
|
||||||
regions.Remove(m_scene.RegionInfo.RegionHandle);
|
|
||||||
|
|
||||||
MakeRootAgent(new Vector3(127f, 127f, 127f), true);
|
|
||||||
|
|
||||||
// Async command
|
|
||||||
if (m_scene.SceneGridService != null)
|
|
||||||
{
|
|
||||||
m_scene.SceneGridService.SendCloseChildAgentConnections(UUID, regions);
|
|
||||||
|
|
||||||
// Give the above command some time to try and close the connections.
|
|
||||||
// this is really an emergency.. so sleep, or we'll get all discombobulated.
|
|
||||||
System.Threading.Thread.Sleep(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_scene.SceneGridService != null)
|
|
||||||
{
|
|
||||||
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
|
|
||||||
if (m_agentTransfer != null)
|
|
||||||
m_agentTransfer.EnableChildAgents(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3226,8 +3201,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 force = m_forceToApply.Value;
|
Vector3 force = m_forceToApply.Value;
|
||||||
|
|
||||||
m_updateflag = true;
|
m_updateflag = true;
|
||||||
// movementvector = force;
|
|
||||||
Velocity = force;
|
// The magic constant 0.855f seems to make walking feel less jerky,
|
||||||
|
// probably because it hackishly accounts for the overall latency of
|
||||||
|
// these Velocity updates -- Diva
|
||||||
|
Velocity = force * .855F;
|
||||||
|
|
||||||
m_forceToApply = null;
|
m_forceToApply = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,13 +43,14 @@ using OpenSim.Tests.Common.Setup;
|
||||||
namespace OpenSim.Region.Framework.Scenes.Tests
|
namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tests manipulation of scene objects by users.
|
/// Tests derez of scene objects by users.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
/// <remarks>
|
||||||
/// This is at a level above the SceneObjectBasicTests, which act on the scene directly.
|
/// This is at a level above the SceneObjectBasicTests, which act on the scene directly.
|
||||||
/// FIXME: These tests are very incomplete - they only test for a few conditions.
|
/// TODO: These tests are very incomplete - they only test for a few conditions.
|
||||||
|
/// </remarks>
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class SceneObjectUserTests
|
public class SceneObjectDeRezTests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test deleting an object from a scene.
|
/// Test deleting an object from a scene.
|
||||||
|
@ -122,6 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero);
|
scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero);
|
||||||
sogd.InventoryDeQueueAndDelete();
|
sogd.InventoryDeQueueAndDelete();
|
||||||
|
|
||||||
|
// Object should still be in the scene.
|
||||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||||
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
||||||
}
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
|
using Nini.Config;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using NUnit.Framework.SyntaxHelpers;
|
||||||
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications;
|
||||||
|
using OpenSim.Region.CoreModules.Avatar.InstantMessage;
|
||||||
|
using OpenSim.Region.CoreModules.World.Permissions;
|
||||||
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
using OpenSim.Tests.Common.Setup;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class SceneObjectUserGroupTests
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Test share with group object functionality
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This test is not yet fully implemented</remarks>
|
||||||
|
[Test]
|
||||||
|
public void TestShareWithGroup()
|
||||||
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
|
||||||
|
|
||||||
|
TestScene scene = SceneSetupHelpers.SetupScene();
|
||||||
|
IConfigSource configSource = new IniConfigSource();
|
||||||
|
|
||||||
|
IConfig startupConfig = configSource.AddConfig("Startup");
|
||||||
|
startupConfig.Set("serverside_object_permissions", true);
|
||||||
|
|
||||||
|
IConfig groupsConfig = configSource.AddConfig("Groups");
|
||||||
|
groupsConfig.Set("Enabled", true);
|
||||||
|
groupsConfig.Set("Module", "GroupsModule");
|
||||||
|
groupsConfig.Set("DebugEnabled", true);
|
||||||
|
|
||||||
|
SceneSetupHelpers.SetupSceneModules(
|
||||||
|
scene, configSource, new object[]
|
||||||
|
{ new PermissionsModule(),
|
||||||
|
new GroupsModule(),
|
||||||
|
new MockGroupsServicesConnector() });
|
||||||
|
|
||||||
|
TestClient client = SceneSetupHelpers.AddRootAgent(scene, userId);
|
||||||
|
|
||||||
|
IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>();
|
||||||
|
|
||||||
|
groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -163,9 +163,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
if (m_msgTransferModule == null)
|
if (m_msgTransferModule == null)
|
||||||
{
|
{
|
||||||
m_groupsEnabled = false;
|
m_groupsEnabled = false;
|
||||||
m_log.Error("[GROUPS]: Could not get MessageTransferModule");
|
m_log.Warn("[GROUPS]: Could not get MessageTransferModule");
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1299,7 +1297,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is local, delivering directly", localClient.Name);
|
if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is local, delivering directly", localClient.Name);
|
||||||
localClient.SendInstantMessage(msg);
|
localClient.SendInstantMessage(msg);
|
||||||
}
|
}
|
||||||
else
|
else if (m_msgTransferModule != null)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is not local, delivering via TransferModule", msgTo);
|
if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is not local, delivering via TransferModule", msgTo);
|
||||||
m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Message Sent: {0}", success?"Succeeded":"Failed"); });
|
m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Message Sent: {0}", success?"Succeeded":"Failed"); });
|
||||||
|
|
|
@ -27,14 +27,12 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
interface IGroupsServicesConnector
|
public interface IGroupsServicesConnector
|
||||||
{
|
{
|
||||||
UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID);
|
UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID);
|
||||||
void UpdateGroup(UUID RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
|
void UpdateGroup(UUID RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* 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.Reflection;
|
||||||
|
using Nini.Config;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using NUnit.Framework.SyntaxHelpers;
|
||||||
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
using OpenSim.Tests.Common.Setup;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Basic groups module tests
|
||||||
|
/// </summary>
|
||||||
|
[TestFixture]
|
||||||
|
public class GroupsModuleTests
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void TestBasic()
|
||||||
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
TestScene scene = SceneSetupHelpers.SetupScene();
|
||||||
|
IConfigSource configSource = new IniConfigSource();
|
||||||
|
IConfig config = configSource.AddConfig("Groups");
|
||||||
|
config.Set("Enabled", true);
|
||||||
|
config.Set("Module", "GroupsModule");
|
||||||
|
config.Set("DebugEnabled", true);
|
||||||
|
SceneSetupHelpers.SetupSceneModules(
|
||||||
|
scene, configSource, new object[] { new MockGroupsServicesConnector() });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -311,7 +311,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
OSD decodedMeshOsd = new OSD();
|
OSD decodedMeshOsd = new OSD();
|
||||||
byte[] meshBytes = new byte[physSize];
|
byte[] meshBytes = new byte[physSize];
|
||||||
System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
|
System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
|
||||||
byte[] decompressed = new byte[physSize * 5];
|
// byte[] decompressed = new byte[physSize * 5];
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (MemoryStream inMs = new MemoryStream(meshBytes))
|
using (MemoryStream inMs = new MemoryStream(meshBytes))
|
||||||
|
|
|
@ -375,7 +375,7 @@ namespace PrimMesher
|
||||||
|
|
||||||
int coordsDown = rows.Count;
|
int coordsDown = rows.Count;
|
||||||
int coordsAcross = rows[0].Count;
|
int coordsAcross = rows[0].Count;
|
||||||
int lastColumn = coordsAcross - 1;
|
// int lastColumn = coordsAcross - 1;
|
||||||
|
|
||||||
float widthUnit = 1.0f / (coordsAcross - 1);
|
float widthUnit = 1.0f / (coordsAcross - 1);
|
||||||
float heightUnit = 1.0f / (coordsDown - 1);
|
float heightUnit = 1.0f / (coordsDown - 1);
|
||||||
|
|
|
@ -1001,7 +1001,7 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
VirtualRegion.Permissions.OnDuplicateObject += BigRegion.PermissionModule.CanDuplicateObject;
|
VirtualRegion.Permissions.OnDuplicateObject += BigRegion.PermissionModule.CanDuplicateObject;
|
||||||
VirtualRegion.Permissions.OnDeleteObject += BigRegion.PermissionModule.CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
VirtualRegion.Permissions.OnDeleteObject += BigRegion.PermissionModule.CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||||
VirtualRegion.Permissions.OnEditObject += BigRegion.PermissionModule.CanEditObject; //MAYBE FULLY IMPLEMENTED
|
VirtualRegion.Permissions.OnEditObject += BigRegion.PermissionModule.CanEditObject; //MAYBE FULLY IMPLEMENTED
|
||||||
VirtualRegion.Permissions.OnEditParcel += BigRegion.PermissionModule.CanEditParcel; //MAYBE FULLY IMPLEMENTED
|
VirtualRegion.Permissions.OnEditParcelProperties += BigRegion.PermissionModule.CanEditParcelProperties; //MAYBE FULLY IMPLEMENTED
|
||||||
VirtualRegion.Permissions.OnInstantMessage += BigRegion.PermissionModule.CanInstantMessage;
|
VirtualRegion.Permissions.OnInstantMessage += BigRegion.PermissionModule.CanInstantMessage;
|
||||||
VirtualRegion.Permissions.OnInventoryTransfer += BigRegion.PermissionModule.CanInventoryTransfer; //NOT YET IMPLEMENTED
|
VirtualRegion.Permissions.OnInventoryTransfer += BigRegion.PermissionModule.CanInventoryTransfer; //NOT YET IMPLEMENTED
|
||||||
VirtualRegion.Permissions.OnIssueEstateCommand += BigRegion.PermissionModule.CanIssueEstateCommand; //FULLY IMPLEMENTED
|
VirtualRegion.Permissions.OnIssueEstateCommand += BigRegion.PermissionModule.CanIssueEstateCommand; //FULLY IMPLEMENTED
|
||||||
|
|
|
@ -105,9 +105,9 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
return m_rootScene.Permissions.CanEditObject(objectid, editorid);
|
return m_rootScene.Permissions.CanEditObject(objectid, editorid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
|
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene)
|
||||||
{
|
{
|
||||||
return m_rootScene.Permissions.CanEditParcel(user, parcel);
|
return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
|
public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
|
||||||
|
|
|
@ -6287,16 +6287,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID key;
|
UUID key;
|
||||||
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
|
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||||
if (land.OwnerID == m_host.OwnerID)
|
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed))
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
if (UUID.TryParse(avatar, out key))
|
if (UUID.TryParse(avatar, out key))
|
||||||
{
|
{
|
||||||
entry.AgentID = key;
|
if (land.LandData.ParcelAccessList.FindIndex(
|
||||||
entry.Flags = AccessList.Access;
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
{
|
||||||
land.ParcelAccessList.Add(entry);
|
if (e.AgentID == key && e.Flags == AccessList.Access)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}) == -1)
|
||||||
|
{
|
||||||
|
entry.AgentID = key;
|
||||||
|
entry.Flags = AccessList.Access;
|
||||||
|
entry.Time = DateTime.Now.AddHours(hours);
|
||||||
|
land.LandData.ParcelAccessList.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9023,7 +9032,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// according to the docs, this command only works if script owner and land owner are the same
|
// according to the docs, this command only works if script owner and land owner are the same
|
||||||
// lets add estate owners and gods, too, and use the generic permission check.
|
// lets add estate owners and gods, too, and use the generic permission check.
|
||||||
ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||||
if (!World.Permissions.CanEditParcel(m_host.OwnerID, landObject)) return;
|
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return;
|
||||||
|
|
||||||
bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
|
bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
|
||||||
byte loop = 0;
|
byte loop = 0;
|
||||||
|
@ -9466,16 +9475,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID key;
|
UUID key;
|
||||||
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
|
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||||
if (land.OwnerID == m_host.OwnerID)
|
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned))
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
if (UUID.TryParse(avatar, out key))
|
if (UUID.TryParse(avatar, out key))
|
||||||
{
|
{
|
||||||
entry.AgentID = key;
|
if (land.LandData.ParcelAccessList.FindIndex(
|
||||||
entry.Flags = AccessList.Ban;
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
{
|
||||||
land.ParcelAccessList.Add(entry);
|
if (e.AgentID == key && e.Flags == AccessList.Ban)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}) == -1)
|
||||||
|
{
|
||||||
|
entry.AgentID = key;
|
||||||
|
entry.Flags = AccessList.Ban;
|
||||||
|
entry.Time = DateTime.Now.AddHours(hours);
|
||||||
|
land.LandData.ParcelAccessList.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9485,19 +9503,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID key;
|
UUID key;
|
||||||
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
|
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||||
if (land.OwnerID == m_host.OwnerID)
|
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed))
|
||||||
{
|
{
|
||||||
if (UUID.TryParse(avatar, out key))
|
if (UUID.TryParse(avatar, out key))
|
||||||
{
|
{
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
|
int idx = land.LandData.ParcelAccessList.FindIndex(
|
||||||
{
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
if (entry.AgentID == key && entry.Flags == AccessList.Access)
|
{
|
||||||
{
|
if (e.AgentID == key && e.Flags == AccessList.Access)
|
||||||
land.ParcelAccessList.Remove(entry);
|
return true;
|
||||||
break;
|
return false;
|
||||||
}
|
});
|
||||||
}
|
|
||||||
|
if (idx != -1)
|
||||||
|
land.LandData.ParcelAccessList.RemoveAt(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9507,19 +9527,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID key;
|
UUID key;
|
||||||
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
|
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||||
if (land.OwnerID == m_host.OwnerID)
|
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned))
|
||||||
{
|
{
|
||||||
if (UUID.TryParse(avatar, out key))
|
if (UUID.TryParse(avatar, out key))
|
||||||
{
|
{
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
|
int idx = land.LandData.ParcelAccessList.FindIndex(
|
||||||
{
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
if (entry.AgentID == key && entry.Flags == AccessList.Ban)
|
{
|
||||||
{
|
if (e.AgentID == key && e.Flags == AccessList.Ban)
|
||||||
land.ParcelAccessList.Remove(entry);
|
return true;
|
||||||
break;
|
return false;
|
||||||
}
|
});
|
||||||
}
|
|
||||||
|
if (idx != -1)
|
||||||
|
land.LandData.ParcelAccessList.RemoveAt(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
|
|
@ -336,6 +336,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void OSSLDeprecated(string function, string replacement)
|
||||||
|
{
|
||||||
|
OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement));
|
||||||
|
}
|
||||||
|
|
||||||
protected void ScriptSleep(int delay)
|
protected void ScriptSleep(int delay)
|
||||||
{
|
{
|
||||||
delay = (int)((float)delay * m_ScriptDelayFactor);
|
delay = (int)((float)delay * m_ScriptDelayFactor);
|
||||||
|
@ -347,13 +352,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
//
|
//
|
||||||
// OpenSim functions
|
// OpenSim functions
|
||||||
//
|
//
|
||||||
|
public LSL_Integer osSetTerrainHeight(int x, int y, double val)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight");
|
||||||
|
return SetTerrainHeight(x, y, val);
|
||||||
|
}
|
||||||
public LSL_Integer osTerrainSetHeight(int x, int y, double val)
|
public LSL_Integer osTerrainSetHeight(int x, int y, double val)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight");
|
CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight");
|
||||||
|
OSSLDeprecated("osTerrainSetHeight", "osSetTerrainHeight");
|
||||||
|
return SetTerrainHeight(x, y, val);
|
||||||
|
}
|
||||||
|
private LSL_Integer SetTerrainHeight(int x, int y, double val)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
|
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
|
||||||
OSSLError("osTerrainSetHeight: Coordinate out of bounds");
|
OSSLError("osSetTerrainHeight: Coordinate out of bounds");
|
||||||
|
|
||||||
if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
|
if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
|
||||||
{
|
{
|
||||||
|
@ -366,13 +380,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Float osGetTerrainHeight(int x, int y)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osGetTerrainHeight");
|
||||||
|
return GetTerrainHeight(x, y);
|
||||||
|
}
|
||||||
public LSL_Float osTerrainGetHeight(int x, int y)
|
public LSL_Float osTerrainGetHeight(int x, int y)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight");
|
CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight");
|
||||||
|
OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight");
|
||||||
|
return GetTerrainHeight(x, y);
|
||||||
|
}
|
||||||
|
private LSL_Float GetTerrainHeight(int x, int y)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
|
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
|
||||||
OSSLError("osTerrainGetHeight: Coordinate out of bounds");
|
OSSLError("osGetTerrainHeight: Coordinate out of bounds");
|
||||||
|
|
||||||
return World.Heightmap[x, y];
|
return World.Heightmap[x, y];
|
||||||
}
|
}
|
||||||
|
@ -1001,9 +1024,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return drawList;
|
return drawList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string osSetPenColor(string drawList, string color)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osSetPenColor");
|
||||||
|
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
drawList += "PenColor " + color + "; ";
|
||||||
|
return drawList;
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public string osSetPenColour(string drawList, string colour)
|
public string osSetPenColour(string drawList, string colour)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osSetPenColour");
|
CheckThreatLevel(ThreatLevel.None, "osSetPenColour");
|
||||||
|
OSSLDeprecated("osSetPenColour", "osSetPenColor");
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
drawList += "PenColour " + colour + "; ";
|
drawList += "PenColour " + colour + "; ";
|
||||||
|
@ -1012,7 +1045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public string osSetPenCap(string drawList, string direction, string type)
|
public string osSetPenCap(string drawList, string direction, string type)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osSetPenColour");
|
CheckThreatLevel(ThreatLevel.None, "osSetPenCap");
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
drawList += "PenCap " + direction + "," + type + "; ";
|
drawList += "PenCap " + direction + "," + type + "; ";
|
||||||
|
@ -1157,6 +1190,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public double osSunGetParam(string param)
|
public double osSunGetParam(string param)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osSunGetParam");
|
CheckThreatLevel(ThreatLevel.None, "osSunGetParam");
|
||||||
|
OSSLDeprecated("osSunGetParam", "osGetSunParam");
|
||||||
|
return GetSunParam(param);
|
||||||
|
}
|
||||||
|
public double osGetSunParam(string param)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osGetSunParam");
|
||||||
|
return GetSunParam(param);
|
||||||
|
}
|
||||||
|
private double GetSunParam(string param)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
|
@ -1173,6 +1216,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void osSunSetParam(string param, double value)
|
public void osSunSetParam(string param, double value)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osSunSetParam");
|
CheckThreatLevel(ThreatLevel.None, "osSunSetParam");
|
||||||
|
OSSLDeprecated("osSunSetParam", "osSetSunParam");
|
||||||
|
SetSunParam(param, value);
|
||||||
|
}
|
||||||
|
public void osSetSunParam(string param, double value)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osSetSunParam");
|
||||||
|
SetSunParam(param, value);
|
||||||
|
}
|
||||||
|
private void SetSunParam(string param, double value)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
ISunModule module = World.RequestModuleInterface<ISunModule>();
|
ISunModule module = World.RequestModuleInterface<ISunModule>();
|
||||||
|
@ -1198,9 +1251,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void osWindParamSet(string plugin, string param, float value)
|
public void osSetWindParam(string plugin, string param, float value)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamSet");
|
CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
||||||
|
@ -1214,9 +1267,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float osWindParamGet(string plugin, string param)
|
public float osGetWindParam(string plugin, string param)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamGet");
|
CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
||||||
|
@ -1257,7 +1310,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public void osParcelSetDetails(LSL_Vector pos, LSL_List rules)
|
public void osParcelSetDetails(LSL_Vector pos, LSL_List rules)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.High, "osParcelSetDetails");
|
const string functionName = "osParcelSetDetails";
|
||||||
|
CheckThreatLevel(ThreatLevel.High, functionName);
|
||||||
|
OSSLDeprecated(functionName, "osSetParcelDetails");
|
||||||
|
SetParcelDetails(pos, rules, functionName);
|
||||||
|
}
|
||||||
|
public void osSetParcelDetails(LSL_Vector pos, LSL_List rules)
|
||||||
|
{
|
||||||
|
const string functionName = "osSetParcelDetails";
|
||||||
|
CheckThreatLevel(ThreatLevel.High, functionName);
|
||||||
|
SetParcelDetails(pos, rules, functionName);
|
||||||
|
}
|
||||||
|
private void SetParcelDetails(LSL_Vector pos, LSL_List rules, string functionName)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
// Get a reference to the land data and make sure the owner of the script
|
// Get a reference to the land data and make sure the owner of the script
|
||||||
|
@ -1270,7 +1335,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! World.Permissions.CanEditParcel(m_host.OwnerID, startLandObject))
|
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions))
|
||||||
{
|
{
|
||||||
OSSLShoutError("You do not have permission to modify the parcel");
|
OSSLShoutError("You do not have permission to modify the parcel");
|
||||||
return;
|
return;
|
||||||
|
@ -1296,13 +1361,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails");
|
CheckThreatLevel(ThreatLevel.VeryHigh, functionName);
|
||||||
if (UUID.TryParse(arg , out uuid))
|
if (UUID.TryParse(arg , out uuid))
|
||||||
newLand.OwnerID = uuid;
|
newLand.OwnerID = uuid;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails");
|
CheckThreatLevel(ThreatLevel.VeryHigh, functionName);
|
||||||
if (UUID.TryParse(arg , out uuid))
|
if (UUID.TryParse(arg , out uuid))
|
||||||
newLand.GroupID = uuid;
|
newLand.GroupID = uuid;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -67,8 +67,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
|
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
|
||||||
bool blend, int disp, int timer, int alpha, int face);
|
bool blend, int disp, int timer, int alpha, int face);
|
||||||
|
|
||||||
LSL_Float osTerrainGetHeight(int x, int y);
|
LSL_Float osGetTerrainHeight(int x, int y);
|
||||||
LSL_Integer osTerrainSetHeight(int x, int y, double val);
|
LSL_Float osTerrainGetHeight(int x, int y); // Deprecated
|
||||||
|
LSL_Integer osSetTerrainHeight(int x, int y, double val);
|
||||||
|
LSL_Integer osTerrainSetHeight(int x, int y, double val); //Deprecated
|
||||||
void osTerrainFlush();
|
void osTerrainFlush();
|
||||||
|
|
||||||
int osRegionRestart(double seconds);
|
int osRegionRestart(double seconds);
|
||||||
|
@ -107,7 +109,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
string osSetFontName(string drawList, string fontName);
|
string osSetFontName(string drawList, string fontName);
|
||||||
string osSetFontSize(string drawList, int fontSize);
|
string osSetFontSize(string drawList, int fontSize);
|
||||||
string osSetPenSize(string drawList, int penSize);
|
string osSetPenSize(string drawList, int penSize);
|
||||||
string osSetPenColour(string drawList, string colour);
|
string osSetPenColor(string drawList, string color);
|
||||||
|
string osSetPenColour(string drawList, string colour); // Deprecated
|
||||||
string osSetPenCap(string drawList, string direction, string type);
|
string osSetPenCap(string drawList, string direction, string type);
|
||||||
string osDrawImage(string drawList, int width, int height, string imageUrl);
|
string osDrawImage(string drawList, int width, int height, string imageUrl);
|
||||||
vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
|
vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
|
||||||
|
@ -119,18 +122,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour);
|
void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour);
|
||||||
void osSetEstateSunSettings(bool sunFixed, double sunHour);
|
void osSetEstateSunSettings(bool sunFixed, double sunHour);
|
||||||
double osGetCurrentSunHour();
|
double osGetCurrentSunHour();
|
||||||
double osSunGetParam(string param);
|
double osGetSunParam(string param);
|
||||||
void osSunSetParam(string param, double value);
|
double osSunGetParam(string param); // Deprecated
|
||||||
|
void osSetSunParam(string param, double value);
|
||||||
|
void osSunSetParam(string param, double value); // Deprecated
|
||||||
|
|
||||||
// Wind Module Functions
|
// Wind Module Functions
|
||||||
string osWindActiveModelPluginName();
|
string osWindActiveModelPluginName();
|
||||||
void osWindParamSet(string plugin, string param, float value);
|
void osSetWindParam(string plugin, string param, float value);
|
||||||
float osWindParamGet(string plugin, string param);
|
float osGetWindParam(string plugin, string param);
|
||||||
|
|
||||||
// Parcel commands
|
// Parcel commands
|
||||||
void osParcelJoin(vector pos1, vector pos2);
|
void osParcelJoin(vector pos1, vector pos2);
|
||||||
void osParcelSubdivide(vector pos1, vector pos2);
|
void osParcelSubdivide(vector pos1, vector pos2);
|
||||||
void osParcelSetDetails(vector pos, LSL_List rules);
|
void osSetParcelDetails(vector pos, LSL_List rules);
|
||||||
|
void osParcelSetDetails(vector pos, LSL_List rules); // Deprecated
|
||||||
|
|
||||||
string osGetScriptEngineName();
|
string osGetScriptEngineName();
|
||||||
string osGetSimulatorVersion();
|
string osGetSimulatorVersion();
|
||||||
|
|
|
@ -81,11 +81,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_OSSL_Functions.osGetCurrentSunHour();
|
return m_OSSL_Functions.osGetCurrentSunHour();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double osGetSunParam(string param)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osGetSunParam(param);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public double osSunGetParam(string param)
|
public double osSunGetParam(string param)
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osSunGetParam(param);
|
return m_OSSL_Functions.osSunGetParam(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetSunParam(string param, double value)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osSetSunParam(param, value);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public void osSunSetParam(string param, double value)
|
public void osSunSetParam(string param, double value)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osSunSetParam(param, value);
|
m_OSSL_Functions.osSunSetParam(param, value);
|
||||||
|
@ -97,14 +107,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not yet plugged in as available OSSL functions, so commented out
|
// Not yet plugged in as available OSSL functions, so commented out
|
||||||
// void osWindParamSet(string plugin, string param, float value)
|
// void osSetWindParam(string plugin, string param, float value)
|
||||||
// {
|
// {
|
||||||
// m_OSSL_Functions.osWindParamSet(plugin, param, value);
|
// m_OSSL_Functions.osSetWindParam(plugin, param, value);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// float osWindParamGet(string plugin, string param)
|
// float osGetWindParam(string plugin, string param)
|
||||||
// {
|
// {
|
||||||
// return m_OSSL_Functions.osWindParamGet(plugin, param);
|
// return m_OSSL_Functions.osGetWindParam(plugin, param);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public void osParcelJoin(vector pos1, vector pos2)
|
public void osParcelJoin(vector pos1, vector pos2)
|
||||||
|
@ -117,6 +127,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
|
m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetParcelDetails(vector pos, LSL_List rules)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osSetParcelDetails(pos, rules);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public void osParcelSetDetails(vector pos, LSL_List rules)
|
public void osParcelSetDetails(vector pos, LSL_List rules)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osParcelSetDetails(pos,rules);
|
m_OSSL_Functions.osParcelSetDetails(pos,rules);
|
||||||
|
@ -165,11 +180,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
blend, disp, timer, alpha, face);
|
blend, disp, timer, alpha, face);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Float osGetTerrainHeight(int x, int y)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osGetTerrainHeight(x, y);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public LSL_Float osTerrainGetHeight(int x, int y)
|
public LSL_Float osTerrainGetHeight(int x, int y)
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osTerrainGetHeight(x, y);
|
return m_OSSL_Functions.osTerrainGetHeight(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osSetTerrainHeight(int x, int y, double val)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public LSL_Integer osTerrainSetHeight(int x, int y, double val)
|
public LSL_Integer osTerrainSetHeight(int x, int y, double val)
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
|
return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
|
||||||
|
@ -333,6 +358,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
|
return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string osSetPenColor(string drawList, string color)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osSetPenColor(drawList, color);
|
||||||
|
}
|
||||||
|
// Deprecated
|
||||||
public string osSetPenColour(string drawList, string colour)
|
public string osSetPenColour(string drawList, string colour)
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osSetPenColour(drawList, colour);
|
return m_OSSL_Functions.osSetPenColour(drawList, colour);
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -48,7 +49,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
// private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013");
|
private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013");
|
||||||
|
|
||||||
private IAssetService m_AssetService;
|
private IAssetService m_AssetService;
|
||||||
|
|
||||||
|
@ -143,43 +144,44 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID m_MissingTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
|
public UUID GetMapImage(UUID regionID, string imageURL, string storagePath)
|
||||||
|
|
||||||
public UUID GetMapImage(UUID regionID, string imageURL)
|
|
||||||
{
|
{
|
||||||
if (m_AssetService == null)
|
if (m_AssetService == null)
|
||||||
return m_MissingTexture;
|
{
|
||||||
|
m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: No AssetService defined. Map tile not retrieved.");
|
||||||
|
return m_HGMapImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
UUID mapTile = m_HGMapImage;
|
||||||
|
string filename = string.Empty;
|
||||||
|
Bitmap bitmap = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
WebClient c = new WebClient();
|
WebClient c = new WebClient();
|
||||||
//m_log.Debug("JPEG: " + imageURL);
|
//m_log.Debug("JPEG: " + imageURL);
|
||||||
string filename = regionID.ToString();
|
string name = regionID.ToString();
|
||||||
c.DownloadFile(imageURL, filename + ".jpg");
|
filename = Path.Combine(storagePath, name + ".jpg");
|
||||||
Bitmap m = new Bitmap(filename + ".jpg");
|
c.DownloadFile(imageURL, filename);
|
||||||
|
bitmap = new Bitmap(filename);
|
||||||
//m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
|
//m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
|
||||||
byte[] imageData = OpenJPEG.EncodeFromImage(m, true);
|
byte[] imageData = OpenJPEG.EncodeFromImage(bitmap, true);
|
||||||
AssetBase ass = new AssetBase(UUID.Random(), "region " + filename, (sbyte)AssetType.Texture, regionID.ToString());
|
AssetBase ass = new AssetBase(UUID.Random(), "region " + name, (sbyte)AssetType.Texture, regionID.ToString());
|
||||||
|
|
||||||
// !!! for now
|
// !!! for now
|
||||||
//info.RegionSettings.TerrainImageID = ass.FullID;
|
//info.RegionSettings.TerrainImageID = ass.FullID;
|
||||||
|
|
||||||
ass.Temporary = true;
|
|
||||||
ass.Local = true;
|
|
||||||
ass.Data = imageData;
|
ass.Data = imageData;
|
||||||
|
|
||||||
m_AssetService.Store(ass);
|
m_AssetService.Store(ass);
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
return ass.FullID;
|
mapTile = ass.FullID;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch // LEGIT: Catching problems caused by OpenJPEG p/invoke
|
catch // LEGIT: Catching problems caused by OpenJPEG p/invoke
|
||||||
{
|
{
|
||||||
m_log.Warn("[GATEKEEPER SERVICE CONNECTOR]: Failed getting/storing map image, because it is probably already in the cache");
|
m_log.Info("[GATEKEEPER SERVICE CONNECTOR]: Failed getting/storing map image, because it is probably already in the cache");
|
||||||
}
|
}
|
||||||
return UUID.Zero;
|
return mapTile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID)
|
public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID)
|
||||||
|
|
|
@ -104,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string uri = m_ServerURL + "/homeagent/" + aCircuit.AgentID + "/";
|
string uri = m_ServerURL + "homeagent/" + aCircuit.AgentID + "/";
|
||||||
|
|
||||||
Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri);
|
Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri);
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the input arguments
|
// Add the input arguments
|
||||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||||
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@ -51,8 +53,6 @@ namespace OpenSim.Services.GridService
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013");
|
|
||||||
|
|
||||||
private static uint m_autoMappingX = 0;
|
private static uint m_autoMappingX = 0;
|
||||||
private static uint m_autoMappingY = 0;
|
private static uint m_autoMappingY = 0;
|
||||||
private static bool m_enableAutoMapping = false;
|
private static bool m_enableAutoMapping = false;
|
||||||
|
@ -64,6 +64,7 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
protected UUID m_ScopeID = UUID.Zero;
|
protected UUID m_ScopeID = UUID.Zero;
|
||||||
protected bool m_Check4096 = true;
|
protected bool m_Check4096 = true;
|
||||||
|
protected string m_MapTileDirectory = string.Empty;
|
||||||
|
|
||||||
// Hyperlink regions are hyperlinks on the map
|
// Hyperlink regions are hyperlinks on the map
|
||||||
public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>();
|
public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>();
|
||||||
|
@ -120,9 +121,24 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
m_Check4096 = gridConfig.GetBoolean("Check4096", true);
|
m_Check4096 = gridConfig.GetBoolean("Check4096", true);
|
||||||
|
|
||||||
|
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", string.Empty);
|
||||||
|
|
||||||
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
|
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
|
||||||
|
|
||||||
m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services...");
|
m_log.Debug("[HYPERGRID LINKER]: Loaded all services...");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(m_MapTileDirectory))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(m_MapTileDirectory);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[HYPERGRID LINKER]: Could not create map tile storage directory {0}: {1}", m_MapTileDirectory, e);
|
||||||
|
m_MapTileDirectory = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MainConsole.Instance != null)
|
if (MainConsole.Instance != null)
|
||||||
|
@ -215,7 +231,9 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason)
|
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, remoteRegionName, xloc, yloc);
|
m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}, in {2}-{3}",
|
||||||
|
((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI),
|
||||||
|
remoteRegionName, xloc / Constants.RegionSize, yloc / Constants.RegionSize);
|
||||||
|
|
||||||
reason = string.Empty;
|
reason = string.Empty;
|
||||||
regInfo = new GridRegion();
|
regInfo = new GridRegion();
|
||||||
|
@ -242,7 +260,9 @@ namespace OpenSim.Services.GridService
|
||||||
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
|
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", regInfo.RegionLocX, regInfo.RegionLocY, region.RegionName, region.RegionID);
|
m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}",
|
||||||
|
regInfo.RegionLocX / Constants.RegionSize, regInfo.RegionLocY / Constants.RegionSize,
|
||||||
|
region.RegionName, region.RegionID);
|
||||||
reason = "Coordinates are already in use";
|
reason = "Coordinates are already in use";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -266,41 +286,22 @@ namespace OpenSim.Services.GridService
|
||||||
if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason))
|
if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (regionID != UUID.Zero)
|
if (regionID == UUID.Zero)
|
||||||
{
|
|
||||||
region = m_GridService.GetRegionByUUID(scopeID, regionID);
|
|
||||||
if (region != null)
|
|
||||||
{
|
|
||||||
m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize);
|
|
||||||
regInfo = region;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
regInfo.RegionID = regionID;
|
|
||||||
|
|
||||||
if ( externalName == string.Empty )
|
|
||||||
regInfo.RegionName = regInfo.ServerURI;
|
|
||||||
else
|
|
||||||
regInfo.RegionName = externalName;
|
|
||||||
|
|
||||||
m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName);
|
|
||||||
|
|
||||||
// Try get the map image
|
|
||||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
|
||||||
// I need a texture that works for this... the one I tried doesn't seem to be working
|
|
||||||
regInfo.TerrainImage = m_HGMapImage;
|
|
||||||
|
|
||||||
AddHyperlinkRegion(regInfo, handle);
|
|
||||||
m_log.Info("[HYPERGRID LINKER]: Successfully linked to region_uuid " + regInfo.RegionID);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_log.Warn("[HYPERGRID LINKER]: Unable to link region");
|
m_log.Warn("[HYPERGRID LINKER]: Unable to link region");
|
||||||
reason = "Remote region could not be found";
|
reason = "Remote region could not be found";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
region = m_GridService.GetRegionByUUID(scopeID, regionID);
|
||||||
|
if (region != null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}",
|
||||||
|
region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize);
|
||||||
|
regInfo = region;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
uint x, y;
|
uint x, y;
|
||||||
if (m_Check4096 && !Check4096(handle, out x, out y))
|
if (m_Check4096 && !Check4096(handle, out x, out y))
|
||||||
{
|
{
|
||||||
|
@ -310,7 +311,20 @@ namespace OpenSim.Services.GridService
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Debug("[HYPERGRID LINKER]: link region succeeded");
|
regInfo.RegionID = regionID;
|
||||||
|
|
||||||
|
if ( externalName == string.Empty )
|
||||||
|
regInfo.RegionName = regInfo.ServerURI;
|
||||||
|
else
|
||||||
|
regInfo.RegionName = externalName;
|
||||||
|
|
||||||
|
m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName);
|
||||||
|
|
||||||
|
// Get the map image
|
||||||
|
regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL, m_MapTileDirectory);
|
||||||
|
|
||||||
|
AddHyperlinkRegion(regInfo, handle);
|
||||||
|
m_log.Info("[HYPERGRID LINKER]: Successfully linked to region_uuid " + regInfo.RegionID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,15 +437,14 @@ namespace OpenSim.Services.GridService
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output("Region Name Region UUID");
|
MainConsole.Instance.Output("Region Name");
|
||||||
MainConsole.Instance.Output("Location URI");
|
MainConsole.Instance.Output("Location Region UUID");
|
||||||
MainConsole.Instance.Output("-------------------------------------------------------------------------------");
|
MainConsole.Instance.Output(new string('-', 72));
|
||||||
foreach (RegionData r in regions)
|
foreach (RegionData r in regions)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n",
|
MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n",
|
||||||
r.RegionName, r.RegionID,
|
r.RegionName, r.RegionID, String.Format("{0},{1} ({2},{3})", r.posX, r.posY,
|
||||||
String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256),
|
r.posX / Constants.RegionSize, r.posY / Constants.RegionSize)));
|
||||||
"http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverHttpPort"].ToString()));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -459,11 +472,14 @@ namespace OpenSim.Services.GridService
|
||||||
xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
|
xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
|
||||||
yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
|
yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
|
||||||
serverURI = cmdparams[2];
|
serverURI = cmdparams[2];
|
||||||
if (cmdparams.Length == 4)
|
if (cmdparams.Length > 3)
|
||||||
remoteName = cmdparams[3];
|
remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3);
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
GridRegion regInfo;
|
GridRegion regInfo;
|
||||||
TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason);
|
if (TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason))
|
||||||
|
MainConsole.Instance.Output("Hyperlink established");
|
||||||
|
else
|
||||||
|
MainConsole.Instance.Output("Failed to link region: " + reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunHGCommand(string command, string[] cmdparams)
|
private void RunHGCommand(string command, string[] cmdparams)
|
||||||
|
@ -487,18 +503,6 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (command.Equals("link-region"))
|
else if (command.Equals("link-region"))
|
||||||
{
|
|
||||||
if (cmdparams.Length > 0 && cmdparams.Length < 5)
|
|
||||||
{
|
|
||||||
RunLinkRegionCommand(cmdparams);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LinkRegionCmdUsage();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (command.Equals("link-region"))
|
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
{
|
{
|
||||||
|
@ -514,40 +518,24 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
|
|
||||||
//this should be the prefererred way of setting up hg links now
|
//this should be the prefererred way of setting up hg links now
|
||||||
if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) {
|
if (cmdparams[2].StartsWith("http"))
|
||||||
|
{
|
||||||
RunLinkRegionCommand(cmdparams);
|
RunLinkRegionCommand(cmdparams);
|
||||||
}
|
}
|
||||||
else if (cmdparams[2].Contains(":"))
|
else if (cmdparams[2].Contains(":"))
|
||||||
{
|
{
|
||||||
// New format
|
// New format
|
||||||
int xloc, yloc;
|
string[] parts = cmdparams[2].Split(':');
|
||||||
string mapName;
|
if (parts.Length > 2)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
xloc = Convert.ToInt32(cmdparams[0]);
|
// Insert remote region name
|
||||||
yloc = Convert.ToInt32(cmdparams[1]);
|
ArrayList parameters = new ArrayList(cmdparams);
|
||||||
mapName = cmdparams[2];
|
parameters.Insert(3, parts[2]);
|
||||||
if (cmdparams.Length > 3)
|
cmdparams = (string[])parameters.ToArray(typeof(string));
|
||||||
for (int i = 3; i < cmdparams.Length; i++)
|
|
||||||
mapName += " " + cmdparams[i];
|
|
||||||
|
|
||||||
//m_log.Info(">> MapName: " + mapName);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
MainConsole.Instance.Output("[HGrid] Wrong format for link-region command: " + e.Message);
|
|
||||||
LinkRegionCmdUsage();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
cmdparams[2] = "http://" + parts[0] + ':' + parts[1];
|
||||||
|
|
||||||
// Convert cell coordinates given by the user to meters
|
RunLinkRegionCommand(cmdparams);
|
||||||
xloc = xloc * (int)Constants.RegionSize;
|
|
||||||
yloc = yloc * (int)Constants.RegionSize;
|
|
||||||
string reason = string.Empty;
|
|
||||||
if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null)
|
|
||||||
MainConsole.Instance.Output("Failed to link region: " + reason);
|
|
||||||
else
|
|
||||||
MainConsole.Instance.Output("Hyperlink established");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -556,16 +544,12 @@ namespace OpenSim.Services.GridService
|
||||||
int xloc, yloc;
|
int xloc, yloc;
|
||||||
uint externalPort;
|
uint externalPort;
|
||||||
string externalHostName;
|
string externalHostName;
|
||||||
string serverURI;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xloc = Convert.ToInt32(cmdparams[0]);
|
xloc = Convert.ToInt32(cmdparams[0]);
|
||||||
yloc = Convert.ToInt32(cmdparams[1]);
|
yloc = Convert.ToInt32(cmdparams[1]);
|
||||||
externalPort = Convert.ToUInt32(cmdparams[3]);
|
externalPort = Convert.ToUInt32(cmdparams[3]);
|
||||||
externalHostName = cmdparams[2];
|
externalHostName = cmdparams[2];
|
||||||
if ( cmdparams.Length == 4 ) {
|
|
||||||
|
|
||||||
}
|
|
||||||
//internalPort = Convert.ToUInt32(cmdparams[4]);
|
//internalPort = Convert.ToUInt32(cmdparams[4]);
|
||||||
//remotingPort = Convert.ToUInt32(cmdparams[5]);
|
//remotingPort = Convert.ToUInt32(cmdparams[5]);
|
||||||
}
|
}
|
||||||
|
@ -582,27 +566,30 @@ namespace OpenSim.Services.GridService
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
|
if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
|
||||||
{
|
{
|
||||||
if (cmdparams.Length >= 5)
|
// What is this? The GridRegion instance will be discarded anyway,
|
||||||
{
|
// which effectively ignores any local name given with the command.
|
||||||
regInfo.RegionName = "";
|
//if (cmdparams.Length >= 5)
|
||||||
for (int i = 4; i < cmdparams.Length; i++)
|
//{
|
||||||
regInfo.RegionName += cmdparams[i] + " ";
|
// regInfo.RegionName = "";
|
||||||
}
|
// for (int i = 4; i < cmdparams.Length; i++)
|
||||||
|
// regInfo.RegionName += cmdparams[i] + " ";
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (command.Equals("unlink-region"))
|
else if (command.Equals("unlink-region"))
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 1 || cmdparams.Length > 1)
|
if (cmdparams.Length < 1)
|
||||||
{
|
{
|
||||||
UnlinkRegionCmdUsage();
|
UnlinkRegionCmdUsage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TryUnlinkRegion(cmdparams[0]))
|
string region = string.Join(" ", cmdparams);
|
||||||
MainConsole.Instance.Output("Successfully unlinked " + cmdparams[0]);
|
if (TryUnlinkRegion(region))
|
||||||
|
MainConsole.Instance.Output("Successfully unlinked " + region);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Output("Unable to unlink " + cmdparams[0] + ", region not found.");
|
MainConsole.Instance.Output("Unable to unlink " + region + ", region not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,42 +123,39 @@ namespace OpenSim.Services.HypergridService
|
||||||
externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
|
externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
|
||||||
imageURL = string.Empty;
|
imageURL = string.Empty;
|
||||||
reason = string.Empty;
|
reason = string.Empty;
|
||||||
|
GridRegion region = null;
|
||||||
|
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName == string.Empty)? "default region" : regionName);
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName == string.Empty)? "default region" : regionName);
|
||||||
if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty)
|
if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty)
|
||||||
{
|
{
|
||||||
List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID);
|
List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID);
|
||||||
if (defs != null && defs.Count > 0)
|
if (defs != null && defs.Count > 0)
|
||||||
m_DefaultGatewayRegion = defs[0];
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
regionID = m_DefaultGatewayRegion.RegionID;
|
region = defs[0];
|
||||||
regionHandle = m_DefaultGatewayRegion.RegionHandle;
|
m_DefaultGatewayRegion = region;
|
||||||
}
|
}
|
||||||
catch
|
else
|
||||||
{
|
{
|
||||||
reason = "Grid setup problem. Try specifying a particular region here.";
|
reason = "Grid setup problem. Try specifying a particular region here.";
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to send information. Please specify a default region for this grid!");
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to send information. Please specify a default region for this grid!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
GridRegion region = m_GridService.GetRegionByName(m_ScopeID, regionName);
|
|
||||||
if (region == null)
|
|
||||||
{
|
{
|
||||||
reason = "Region not found";
|
region = m_GridService.GetRegionByName(m_ScopeID, regionName);
|
||||||
return false;
|
if (region == null)
|
||||||
|
{
|
||||||
|
reason = "Region not found";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
regionID = region.RegionID;
|
regionID = region.RegionID;
|
||||||
regionHandle = region.RegionHandle;
|
regionHandle = region.RegionHandle;
|
||||||
string regionimage = "regionImage" + region.RegionID.ToString();
|
|
||||||
regionimage = regionimage.Replace("-", "");
|
|
||||||
|
|
||||||
|
string regionimage = "regionImage" + regionID.ToString();
|
||||||
|
regionimage = regionimage.Replace("-", "");
|
||||||
imageURL = region.ServerURI + "index.php?method=" + regionimage;
|
imageURL = region.ServerURI + "index.php?method=" + regionimage;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Services.HypergridService
|
||||||
serverConfig = config.Configs["GatekeeperService"];
|
serverConfig = config.Configs["GatekeeperService"];
|
||||||
m_GridName = serverConfig.GetString("ExternalName", string.Empty);
|
m_GridName = serverConfig.GetString("ExternalName", string.Empty);
|
||||||
}
|
}
|
||||||
else if (!m_GridName.EndsWith("/"))
|
if (!m_GridName.EndsWith("/"))
|
||||||
m_GridName = m_GridName + "/";
|
m_GridName = m_GridName + "/";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Services.Interfaces
|
||||||
if (str != string.Empty)
|
if (str != string.Empty)
|
||||||
{
|
{
|
||||||
string[] parts = str.Split(new char[] { ';' });
|
string[] parts = str.Split(new char[] { ';' });
|
||||||
Dictionary<string, object> dic = new Dictionary<string, object>();
|
// Dictionary<string, object> dic = new Dictionary<string, object>();
|
||||||
foreach (string s in parts)
|
foreach (string s in parts)
|
||||||
{
|
{
|
||||||
string[] parts2 = s.Split(new char[] { '*' });
|
string[] parts2 = s.Split(new char[] { '*' });
|
||||||
|
|
|
@ -772,6 +772,8 @@ namespace OpenSim.Services.LLLoginService
|
||||||
{
|
{
|
||||||
aCircuit.ServiceURLs[kvp.Key] = kvp.Value;
|
aCircuit.ServiceURLs[kvp.Key] = kvp.Value;
|
||||||
}
|
}
|
||||||
|
if (!aCircuit.ServiceURLs[kvp.Key].ToString().EndsWith("/"))
|
||||||
|
aCircuit.ServiceURLs[kvp.Key] = aCircuit.ServiceURLs[kvp.Key] + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// New style: service keys start with SRV_; override the previous
|
// New style: service keys start with SRV_; override the previous
|
||||||
|
@ -784,6 +786,9 @@ namespace OpenSim.Services.LLLoginService
|
||||||
{
|
{
|
||||||
string keyName = serviceKey.Replace("SRV_", "");
|
string keyName = serviceKey.Replace("SRV_", "");
|
||||||
aCircuit.ServiceURLs[keyName] = m_LoginServerConfig.GetString(serviceKey, string.Empty);
|
aCircuit.ServiceURLs[keyName] = m_LoginServerConfig.GetString(serviceKey, string.Empty);
|
||||||
|
if (!aCircuit.ServiceURLs[keyName].ToString().EndsWith("/"))
|
||||||
|
aCircuit.ServiceURLs[keyName] = aCircuit.ServiceURLs[keyName] + "/";
|
||||||
|
|
||||||
m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]);
|
m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,237 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
|
using Nini.Config;
|
||||||
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups;
|
||||||
|
|
||||||
|
namespace OpenSim.Tests.Common.Mock
|
||||||
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector
|
||||||
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "MockGroupsServicesConnector"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Adding to region {0}", scene.RegionInfo.RegionName);
|
||||||
|
scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
|
||||||
|
int membershipFee, bool openEnrollment, bool allowPublish,
|
||||||
|
bool maturePublish, UUID founderID)
|
||||||
|
{
|
||||||
|
return UUID.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
|
||||||
|
UUID insigniaID, int membershipFee, bool openEnrollment,
|
||||||
|
bool allowPublish, bool maturePublish)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
|
||||||
|
string title, ulong powers)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
|
||||||
|
string title, ulong powers)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID GroupID, string GroupName)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID)
|
||||||
|
{
|
||||||
|
return default(GroupProfileData);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAgentActiveGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAgentActiveGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAgentGroupInfo(UUID requestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAgentToGroupInvite(UUID requestingAgentID, UUID inviteID, UUID groupID, UUID roleID, UUID agentID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAgentToGroupInvite(UUID requestingAgentID, UUID inviteID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAgentToGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAgentFromGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAgentToGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAgentFromGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DirGroupsReplyData> FindGroups(UUID requestingAgentID, string search)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupMembershipData GetAgentGroupMembership(UUID requestingAgentID, UUID AgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupMembershipData GetAgentActiveMembership(UUID requestingAgentID, UUID AgentID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupMembershipData> GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID)
|
||||||
|
{
|
||||||
|
return new List<GroupMembershipData>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupRolesData> GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupRolesData> GetGroupRoles(UUID requestingAgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupMembersData> GetGroupMembers(UUID requestingAgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupRoleMembersData> GetGroupRoleMembers(UUID requestingAgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GroupNoticeData> GetGroupNotices(UUID requestingAgentID, UUID GroupID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetAgentGroupChatSessions(UUID agentID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -424,10 +424,13 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
foreach (IRegionModuleBase module in newModules)
|
foreach (IRegionModuleBase module in newModules)
|
||||||
{
|
{
|
||||||
module.AddRegion(scene);
|
module.AddRegion(scene);
|
||||||
module.RegionLoaded(scene);
|
|
||||||
scene.AddRegionModule(module.Name, module);
|
scene.AddRegionModule(module.Name, module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RegionLoaded is fired after all modules have been appropriately added to all scenes
|
||||||
|
foreach (IRegionModuleBase module in newModules)
|
||||||
|
module.RegionLoaded(scene);
|
||||||
|
|
||||||
scene.SetModuleInterfaces();
|
scene.SetModuleInterfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,9 +397,7 @@
|
||||||
; sized packets and faster sending of data, but more delay in
|
; sized packets and faster sending of data, but more delay in
|
||||||
; updating interest lists
|
; updating interest lists
|
||||||
;
|
;
|
||||||
;PrimTerseUpdatesPerPacket = 25
|
;PrimUpdatesPerCallback = 100
|
||||||
;AvatarTerseUpdatesPerPacket = 10
|
|
||||||
;PrimFullUpdatesPerPacket = 100
|
|
||||||
|
|
||||||
; TextureSendLimit determines how many packets will be put on
|
; TextureSendLimit determines how many packets will be put on
|
||||||
; the outgoing queue each cycle. Like the settings above, this
|
; the outgoing queue each cycle. Like the settings above, this
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector"
|
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector"
|
||||||
|
|
||||||
; * This is common for all services, it's the network setup for the entire
|
; * This is common for all services, it's the network setup for the entire
|
||||||
; * server instance, if none if specified above
|
; * server instance, if none is specified above
|
||||||
; *
|
; *
|
||||||
[Network]
|
[Network]
|
||||||
port = 8003
|
port = 8003
|
||||||
|
@ -48,7 +48,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
[AssetService]
|
[AssetService]
|
||||||
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
|
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
|
||||||
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
|
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
|
||||||
AssetLoaderArgs = "assets/AssetSets.xml"
|
AssetLoaderArgs = "./assets/AssetSets.xml"
|
||||||
|
|
||||||
; * This configuration loads the inventory server modules. It duplicates
|
; * This configuration loads the inventory server modules. It duplicates
|
||||||
; * the function of the legacy inventory server
|
; * the function of the legacy inventory server
|
||||||
|
@ -68,6 +68,12 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
;; Perform distance check for the creation of a linked region
|
;; Perform distance check for the creation of a linked region
|
||||||
; Check4096 = "True"
|
; Check4096 = "True"
|
||||||
|
|
||||||
|
;; Needed to display non-default map tile images for linked regions
|
||||||
|
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
|
||||||
|
|
||||||
|
;; Directory for map tile images of linked regions
|
||||||
|
; MapTileDirectory = "./"
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegionName> = "<flags>"
|
;; The syntax is: Region_<RegionName> = "<flags>"
|
||||||
;; or: Region_<RegionID> = "<flags>"
|
;; or: Region_<RegionID> = "<flags>"
|
||||||
|
@ -79,11 +85,22 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
; * This is the configuration for the freeswitch server in grid mode
|
; * This is the configuration for the freeswitch server in grid mode
|
||||||
[FreeswitchService]
|
[FreeswitchService]
|
||||||
LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
|
LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
|
||||||
|
;; IP of your FS server
|
||||||
|
; ServerAddress = 127.0.0.1
|
||||||
|
|
||||||
|
;; All other options are - well - optional
|
||||||
|
; Realm = "127.0.0.1"
|
||||||
|
; SIPProxy = "127.0.0.1:5060"
|
||||||
|
; EchoServer = "127.0.0.1"
|
||||||
|
; EchoPort = 50505
|
||||||
|
; AttemptSTUN = "false"
|
||||||
|
; DefaultTimeout = 5000
|
||||||
|
; Context = "default"
|
||||||
|
; UserName = "freeswitch"
|
||||||
|
; Password = "password"
|
||||||
|
|
||||||
; * This is the new style authentication service. Currently, only MySQL
|
; * This is the new style authentication service. Currently, only MySQL
|
||||||
; * is implemented. "Realm" is the table that is used for user lookup.
|
; * is implemented.
|
||||||
; * It defaults to "useraccounts", which uses the new style.
|
|
||||||
; * Realm = "users" will use the legacy tables as an authentication source
|
|
||||||
; *
|
; *
|
||||||
[AuthenticationService]
|
[AuthenticationService]
|
||||||
; for the server connector
|
; for the server connector
|
||||||
|
@ -97,7 +114,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
|
|
||||||
; * This is the new style user service.
|
; * This is the new style user service.
|
||||||
; * "Realm" is the table that is used for user lookup.
|
; * "Realm" is the table that is used for user lookup.
|
||||||
; * It defaults to "users", which uses the legacy tables
|
; * It defaults to "useraccounts", which uses the new style.
|
||||||
|
; * Realm = "users" will use the legacy tables as an authentication source
|
||||||
; *
|
; *
|
||||||
[UserAccountService]
|
[UserAccountService]
|
||||||
; for the server connector
|
; for the server connector
|
||||||
|
@ -150,7 +168,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
AllowRemoteSetLoginLevel = "false"
|
AllowRemoteSetLoginLevel = "false"
|
||||||
|
|
||||||
; If you run this login server behind a proxy, set this to true
|
; If you run this login server behind a proxy, set this to true
|
||||||
; HasProxy = true
|
; HasProxy = false
|
||||||
|
|
||||||
; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs)
|
; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs)
|
||||||
; CHANGE THIS
|
; CHANGE THIS
|
||||||
|
@ -159,7 +177,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
SRV_HomeURI = "http://127.0.0.1:8002"
|
SRV_HomeURI = "http://127.0.0.1:8002"
|
||||||
SRV_InventoryServerURI = "http://127.0.0.1:8002"
|
SRV_InventoryServerURI = "http://127.0.0.1:8002"
|
||||||
SRV_AssetServerURI = "http://127.0.0.1:8002"
|
SRV_AssetServerURI = "http://127.0.0.1:8002"
|
||||||
SRV_ProfileServerURI = "http://127.0.0.1:8002"
|
SRV_ProfileServerURI = "http://127.0.0.1:8002/user"
|
||||||
|
|
||||||
[GridInfoService]
|
[GridInfoService]
|
||||||
; These settings are used to return information on a get_grid_info call.
|
; These settings are used to return information on a get_grid_info call.
|
||||||
|
@ -218,7 +236,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
AllowTeleportsToAnyRegion = true
|
AllowTeleportsToAnyRegion = true
|
||||||
|
|
||||||
; If you run this gatekeeper server behind a proxy, set this to true
|
; If you run this gatekeeper server behind a proxy, set this to true
|
||||||
; HasProxy = true
|
; HasProxy = false
|
||||||
|
|
||||||
|
|
||||||
[UserAgentService]
|
[UserAgentService]
|
||||||
|
@ -229,7 +247,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
|
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
|
||||||
|
|
||||||
; If you run this user agent server behind a proxy, set this to true
|
; If you run this user agent server behind a proxy, set this to true
|
||||||
; HasProxy = true
|
; HasProxy = false
|
||||||
|
|
||||||
;; If you separate the UserAgentService from the LoginService, set this to
|
;; If you separate the UserAgentService from the LoginService, set this to
|
||||||
;; the IP address of the machine where your LoginService is
|
;; the IP address of the machine where your LoginService is
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
|
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
|
||||||
|
|
||||||
; * This is common for all services, it's the network setup for the entire
|
; * This is common for all services, it's the network setup for the entire
|
||||||
; * server instance, if none if specified above
|
; * server instance, if none is specified above
|
||||||
; *
|
; *
|
||||||
[Network]
|
[Network]
|
||||||
port = 8003
|
port = 8003
|
||||||
|
@ -40,7 +40,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
[AssetService]
|
[AssetService]
|
||||||
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
|
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
|
||||||
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
|
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
|
||||||
AssetLoaderArgs = "assets/AssetSets.xml"
|
AssetLoaderArgs = "./assets/AssetSets.xml"
|
||||||
AllowRemoteDelete = "false"
|
AllowRemoteDelete = "false"
|
||||||
|
|
||||||
; * This configuration loads the inventory server modules. It duplicates
|
; * This configuration loads the inventory server modules. It duplicates
|
||||||
|
@ -84,9 +84,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
; Password = "password"
|
; Password = "password"
|
||||||
|
|
||||||
; * This is the new style authentication service. Currently, only MySQL
|
; * This is the new style authentication service. Currently, only MySQL
|
||||||
; * is implemented. "Realm" is the table that is used for user lookup.
|
; * is implemented.
|
||||||
; * It defaults to "users", which uses the legacy tables as an
|
|
||||||
; * authentication source.
|
|
||||||
; *
|
; *
|
||||||
[AuthenticationService]
|
[AuthenticationService]
|
||||||
; for the server connector
|
; for the server connector
|
||||||
|
@ -158,7 +156,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
; MapTileURL = "";
|
; MapTileURL = "";
|
||||||
|
|
||||||
; If you run this login server behind a proxy, set this to true
|
; If you run this login server behind a proxy, set this to true
|
||||||
; HasProxy = true
|
; HasProxy = false
|
||||||
|
|
||||||
[GridInfoService]
|
[GridInfoService]
|
||||||
; These settings are used to return information on a get_grid_info call.
|
; These settings are used to return information on a get_grid_info call.
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
GridServerURI = "http://mygridserver.com:8003"
|
GridServerURI = "http://mygridserver.com:8003"
|
||||||
;AllowHypergridMapSearch = true
|
;AllowHypergridMapSearch = true
|
||||||
|
|
||||||
|
;; Directory for map tile images of linked regions
|
||||||
|
; MapTileDirectory = "./"
|
||||||
|
|
||||||
[AvatarService]
|
[AvatarService]
|
||||||
;
|
;
|
||||||
; change this to your grid-wide grid server
|
; change this to your grid-wide grid server
|
||||||
|
@ -84,7 +87,7 @@
|
||||||
; Change this to your profile server
|
; Change this to your profile server
|
||||||
; accessible from other grids
|
; accessible from other grids
|
||||||
;
|
;
|
||||||
ProfileServerURI = "http://mygridserver.com:8002/profiles"
|
ProfileServerURI = "http://mygridserver.com:8002/user"
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists.
|
;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists.
|
||||||
|
|
|
@ -44,12 +44,15 @@
|
||||||
LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector"
|
LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector"
|
||||||
|
|
||||||
[GridService]
|
[GridService]
|
||||||
; RemoteGridServicesConnector instantiates a LocalGridServicesConnector,
|
; RemoteGridServicesConnector instantiates a LocalGridServicesConnector,
|
||||||
; which in turn uses this
|
; which in turn uses this
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
|
||||||
AllowHypergridMapSearch = true
|
; Needed to display non-default map tile images for linked regions
|
||||||
|
AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector"
|
||||||
|
|
||||||
|
AllowHypergridMapSearch = true
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
||||||
|
|
|
@ -65,6 +65,9 @@
|
||||||
;; With hypergrid, perform distance check for the creation of a linked region
|
;; With hypergrid, perform distance check for the creation of a linked region
|
||||||
; Check4096 = true
|
; Check4096 = true
|
||||||
|
|
||||||
|
;; Directory for map tile images of remote regions
|
||||||
|
; MapTileDirectory = "./"
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegioName> = "<flags>"
|
;; The syntax is: Region_<RegioName> = "<flags>"
|
||||||
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
|
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
|
||||||
|
|
|
@ -65,12 +65,15 @@
|
||||||
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||||
|
|
||||||
[GridService]
|
[GridService]
|
||||||
; LocalGridServicesConnector needs this
|
; LocalGridServicesConnector needs this
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
Realm = "regions"
|
Realm = "regions"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll"
|
StorageProvider = "OpenSim.Data.Null.dll"
|
||||||
|
|
||||||
AllowHypergridMapSearch = true
|
; Needed to display non-default map tile images for remote regions
|
||||||
|
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
|
||||||
|
|
||||||
|
AllowHypergridMapSearch = true
|
||||||
|
|
||||||
[PresenceService]
|
[PresenceService]
|
||||||
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
|
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||||
|
|
Binary file not shown.
59
prebuild.xml
59
prebuild.xml
|
@ -2733,6 +2733,7 @@
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="System.Data"/>
|
<Reference name="System.Data"/>
|
||||||
<Reference name="log4net" path="../../../bin/"/>
|
<Reference name="log4net" path="../../../bin/"/>
|
||||||
|
<Reference name="Mono.Addins" path="../../../bin/"/>
|
||||||
<Reference name="Nini" path="../../../bin/"/>
|
<Reference name="Nini" path="../../../bin/"/>
|
||||||
<Reference name="nunit.framework" path="../../../bin/"/>
|
<Reference name="nunit.framework" path="../../../bin/"/>
|
||||||
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
||||||
|
@ -2747,6 +2748,7 @@
|
||||||
<Reference name="OpenSim.Server.Base"/>
|
<Reference name="OpenSim.Server.Base"/>
|
||||||
<Reference name="OpenSim.Region.Framework"/>
|
<Reference name="OpenSim.Region.Framework"/>
|
||||||
<Reference name="OpenSim.Region.CoreModules"/>
|
<Reference name="OpenSim.Region.CoreModules"/>
|
||||||
|
<Reference name="OpenSim.Region.OptionalModules"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
|
@ -2974,6 +2976,62 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project frameworkVersion="v3_5" name="OpenSim.Region.OptionalModules.Tests" path="OpenSim/Region/OptionalModules" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Core"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Drawing"/>
|
||||||
|
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenSim.Data"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Serialization"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
|
<Reference name="OpenSim.Region.Framework"/>
|
||||||
|
<Reference name="OpenSim.Region.CoreModules"/>
|
||||||
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
|
<Reference name="OpenSim.Services.Interfaces"/>
|
||||||
|
|
||||||
|
<!-- Unit tests -->
|
||||||
|
<Reference name="OpenSim.Tests.Common"/>
|
||||||
|
<Reference name="Nini" path="../../../bin/"/>
|
||||||
|
<Reference name="nunit.framework" path="../../../bin/"/>
|
||||||
|
|
||||||
|
<!-- For scripting in funny languages by default -->
|
||||||
|
<Reference name="XMLRPC" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="Nini" path="../../../bin/"/>
|
||||||
|
<Reference name="log4net" path="../../../bin/"/>
|
||||||
|
<Reference name="DotNetOpenMail" path="../../../bin/"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TODO: this is kind of lame, we basically build a duplicate
|
||||||
|
assembly but with tests added in, just so that we don't
|
||||||
|
need to hard code in a bunch of Test directories here. If
|
||||||
|
pattern="Tests/*.cs" worked, we wouldn't need this.
|
||||||
|
-->
|
||||||
|
<Files>
|
||||||
|
<!-- SADLY the way this works means you need to keep adding these paths -->
|
||||||
|
<Match path="Avatar/XmlRpcGroups/Tests" pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
<Project frameworkVersion="v3_5" name="OpenSim.Region.Framework.Tests" path="OpenSim/Region/Framework" type="Library">
|
<Project frameworkVersion="v3_5" name="OpenSim.Region.Framework.Tests" path="OpenSim/Region/Framework" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -3002,6 +3060,7 @@
|
||||||
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||||
<Reference name="OpenSim.Region.Framework"/>
|
<Reference name="OpenSim.Region.Framework"/>
|
||||||
<Reference name="OpenSim.Region.CoreModules"/>
|
<Reference name="OpenSim.Region.CoreModules"/>
|
||||||
|
<Reference name="OpenSim.Region.OptionalModules"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="OpenSim.Services.Interfaces"/>
|
<Reference name="OpenSim.Services.Interfaces"/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue