Merge branch 'master' into danmerge
commit
adeab48e7e
|
@ -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" /> -->
|
||||||
|
|
|
@ -1124,6 +1124,12 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
// SL Specific, Ignore. (Remove from IClient)
|
// SL Specific, Ignore. (Remove from IClient)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
||||||
{
|
{
|
||||||
// SL Specific, Ignore. (Remove from IClient)
|
// SL Specific, Ignore. (Remove from IClient)
|
||||||
|
@ -1722,5 +1728,9 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -677,6 +677,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
|
@ -1226,5 +1231,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,8 +88,6 @@ namespace OpenSim.Framework
|
||||||
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
||||||
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
||||||
|
|
||||||
private static AvatarWearable[] defaultWearables = null;
|
|
||||||
|
|
||||||
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
||||||
protected List<UUID> m_ids = new List<UUID>();
|
protected List<UUID> m_ids = new List<UUID>();
|
||||||
|
|
||||||
|
@ -221,7 +219,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
||||||
for (int i = 0; i < MAX_WEARABLES; i++)
|
for (int i = 0; i < MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
defaultWearables[i] = new AvatarWearable();
|
defaultWearables[i] = new AvatarWearable();
|
||||||
|
|
|
@ -1344,6 +1344,12 @@ namespace OpenSim.Framework.Capabilities
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string uploaderCaps(byte[] data, string path, string param)
|
public string uploaderCaps(byte[] data, string path, string param)
|
||||||
{
|
{
|
||||||
|
handlerUpLoad = OnUpLoad;
|
||||||
|
if (handlerUpLoad != null)
|
||||||
|
{
|
||||||
|
Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); });
|
||||||
|
}
|
||||||
|
|
||||||
string res = String.Empty;
|
string res = String.Empty;
|
||||||
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
||||||
uploadComplete.new_asset = newAssetID.ToString();
|
uploadComplete.new_asset = newAssetID.ToString();
|
||||||
|
@ -1354,12 +1360,6 @@ namespace OpenSim.Framework.Capabilities
|
||||||
|
|
||||||
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
||||||
|
|
||||||
handlerUpLoad = OnUpLoad;
|
|
||||||
if (handlerUpLoad != null)
|
|
||||||
{
|
|
||||||
handlerUpLoad(newAssetID, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
|
m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -177,8 +177,9 @@ 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,
|
||||||
|
int sections, List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
IClientAPI remote_client);
|
IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void ParcelPropertiesRequest(
|
public delegate void ParcelPropertiesRequest(
|
||||||
|
@ -576,14 +577,33 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public ISceneEntity Entity;
|
public ISceneEntity Entity;
|
||||||
public PrimUpdateFlags Flags;
|
public PrimUpdateFlags Flags;
|
||||||
|
public float TimeDilation;
|
||||||
|
|
||||||
public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags)
|
public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation)
|
||||||
{
|
{
|
||||||
Entity = entity;
|
Entity = entity;
|
||||||
Flags = flags;
|
Flags = flags;
|
||||||
|
TimeDilation = timedilation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class PlacesReplyData
|
||||||
|
{
|
||||||
|
public UUID OwnerID;
|
||||||
|
public string Name;
|
||||||
|
public string Desc;
|
||||||
|
public int ActualArea;
|
||||||
|
public int BillableArea;
|
||||||
|
public byte Flags;
|
||||||
|
public uint GlobalX;
|
||||||
|
public uint GlobalY;
|
||||||
|
public uint GlobalZ;
|
||||||
|
public string SimName;
|
||||||
|
public UUID SnapshotID;
|
||||||
|
public uint Dwell;
|
||||||
|
public int Price;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies the fields that have been changed when sending a prim or
|
/// Specifies the fields that have been changed when sending a prim or
|
||||||
/// avatar update
|
/// avatar update
|
||||||
|
@ -1064,6 +1084,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
void SendXferPacket(ulong xferID, uint packet, byte[] data);
|
void SendXferPacket(ulong xferID, uint packet, byte[] data);
|
||||||
|
|
||||||
|
void SendAbortXferPacket(ulong xferID);
|
||||||
|
|
||||||
void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
||||||
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
|
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
|
||||||
float PriceObjectScaleFactor,
|
float PriceObjectScaleFactor,
|
||||||
|
@ -1319,5 +1341,7 @@ namespace OpenSim.Framework
|
||||||
void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
|
void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
|
||||||
|
|
||||||
void StopFlying(ISceneEntity presence);
|
void StopFlying(ISceneEntity presence);
|
||||||
|
|
||||||
|
void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,7 +340,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
int count = -1;
|
int count = -1;
|
||||||
|
|
||||||
while (count < len)
|
while (count < len && idx < input.Length)
|
||||||
{
|
{
|
||||||
// int l = input[idx].Length;
|
// int l = input[idx].Length;
|
||||||
string ln = input[idx];
|
string ln = input[idx];
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,8 +53,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
private static byte[] ReadFully(Stream stream)
|
private static byte[] ReadFully(Stream stream)
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[32768];
|
byte[] buffer = new byte[1024];
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream(1024*256))
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -224,6 +224,7 @@ namespace OpenSim
|
||||||
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
|
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
|
||||||
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
|
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
|
||||||
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
|
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
|
||||||
|
+ "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n"
|
||||||
+ "If level <= 0 then no packets are logged.",
|
+ "If level <= 0 then no packets are logged.",
|
||||||
Debug);
|
Debug);
|
||||||
|
|
||||||
|
@ -265,10 +266,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);
|
||||||
|
|
|
@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
|
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
|
||||||
/// ownerless phantom.
|
/// ownerless phantom.
|
||||||
///
|
///
|
||||||
/// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
|
/// All manipulation of this set has to occur under a lock
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
protected HashSet<uint> m_killRecord;
|
protected HashSet<uint> m_killRecord;
|
||||||
|
@ -1529,7 +1529,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (m_scene.GetScenePresence(localID) == null)
|
if (m_scene.GetScenePresence(localID) == null)
|
||||||
{
|
{
|
||||||
lock (m_entityUpdates.SyncRoot)
|
// We must lock for both manipulating the kill record and sending the packet, in order to avoid a race
|
||||||
|
// condition where a kill can be processed before an out-of-date update for the same object.
|
||||||
|
lock (m_killRecord)
|
||||||
{
|
{
|
||||||
m_killRecord.Add(localID);
|
m_killRecord.Add(localID);
|
||||||
|
|
||||||
|
@ -2084,6 +2086,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(sendXfer, ThrottleOutPacketType.Asset);
|
OutPacket(sendXfer, ThrottleOutPacketType.Asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
AbortXferPacket xferItem = (AbortXferPacket)PacketPool.Instance.GetPacket(PacketType.AbortXfer);
|
||||||
|
xferItem.XferID.ID = xferID;
|
||||||
|
OutPacket(xferItem, ThrottleOutPacketType.Asset);
|
||||||
|
}
|
||||||
|
|
||||||
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
||||||
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
||||||
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
||||||
|
@ -3554,7 +3563,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
double priority = m_prioritizer.GetUpdatePriority(this, entity);
|
double priority = m_prioritizer.GetUpdatePriority(this, entity);
|
||||||
|
|
||||||
lock (m_entityUpdates.SyncRoot)
|
lock (m_entityUpdates.SyncRoot)
|
||||||
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId);
|
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation), entity.LocalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessEntityUpdates(int maxUpdates)
|
private void ProcessEntityUpdates(int maxUpdates)
|
||||||
|
@ -3562,15 +3571,25 @@ 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)
|
// We must lock for both manipulating the kill record and sending the packet, in order to avoid a race
|
||||||
|
// condition where a kill can be processed before an out-of-date update for the same object.
|
||||||
|
lock (m_killRecord)
|
||||||
{
|
{
|
||||||
|
float avgTimeDilation = 1.0f;
|
||||||
EntityUpdate update;
|
EntityUpdate update;
|
||||||
while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
|
while (updatesThisCall < maxUpdates)
|
||||||
{
|
{
|
||||||
|
lock (m_entityUpdates.SyncRoot)
|
||||||
|
if (!m_entityUpdates.TryDequeue(out update))
|
||||||
|
break;
|
||||||
|
avgTimeDilation += update.TimeDilation;
|
||||||
|
avgTimeDilation *= 0.5f;
|
||||||
|
|
||||||
if (update.Entity is SceneObjectPart)
|
if (update.Entity is SceneObjectPart)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
||||||
|
@ -3667,36 +3686,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
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;
|
||||||
// string text = sop.Text;
|
// string text = sop.Text;
|
||||||
// if (text.IndexOf("\n") >= 0)
|
// if (text.IndexOf("\n") >= 0)
|
||||||
// text = text.Remove(text.IndexOf("\n"));
|
// text = text.Remove(text.IndexOf("\n"));
|
||||||
//
|
//
|
||||||
// if (m_attachmentsSent.Contains(sop.ParentID))
|
// if (m_attachmentsSent.Contains(sop.ParentID))
|
||||||
// {
|
// {
|
||||||
//// m_log.DebugFormat(
|
//// m_log.DebugFormat(
|
||||||
//// "[CLIENT]: Sending full info about attached prim {0} text {1}",
|
//// "[CLIENT]: Sending full info about attached prim {0} text {1}",
|
||||||
//// sop.LocalId, text);
|
//// sop.LocalId, text);
|
||||||
//
|
//
|
||||||
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
|
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
|
||||||
//
|
//
|
||||||
// m_attachmentsSent.Add(sop.LocalId);
|
// m_attachmentsSent.Add(sop.LocalId);
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
|
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
|
||||||
// sop.LocalId, text, sop.ParentID);
|
// sop.LocalId, text, sop.ParentID);
|
||||||
//
|
//
|
||||||
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
|
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// 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)
|
else if (!canUseImproved)
|
||||||
|
@ -3705,6 +3724,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
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
|
||||||
|
// Everything else goes here
|
||||||
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
|
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3713,8 +3737,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#region Packet Sending
|
#region Packet Sending
|
||||||
|
|
||||||
const float TIME_DILATION = 1.0f;
|
//const float TIME_DILATION = 1.0f;
|
||||||
ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
|
ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
if (terseAgentUpdateBlocks.IsValueCreated)
|
||||||
|
{
|
||||||
|
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.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.Unknown, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (objectUpdateBlocks.IsValueCreated)
|
if (objectUpdateBlocks.IsValueCreated)
|
||||||
{
|
{
|
||||||
|
@ -7188,8 +7230,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
//handlerTextureRequest = null;
|
//handlerTextureRequest = null;
|
||||||
for (int i = 0; i < imageRequest.RequestImage.Length; i++)
|
for (int i = 0; i < imageRequest.RequestImage.Length; i++)
|
||||||
{
|
|
||||||
if (OnRequestTexture != null)
|
|
||||||
{
|
{
|
||||||
TextureRequestArgs args = new TextureRequestArgs();
|
TextureRequestArgs args = new TextureRequestArgs();
|
||||||
|
|
||||||
|
@ -7207,18 +7247,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if ((ImageType)block.Type == ImageType.Baked)
|
if ((ImageType)block.Type == ImageType.Baked)
|
||||||
args.Priority *= 2.0f;
|
args.Priority *= 2.0f;
|
||||||
|
|
||||||
//handlerTextureRequest = OnRequestTexture;
|
|
||||||
|
|
||||||
//if (handlerTextureRequest != null)
|
|
||||||
//OnRequestTexture(this, args);
|
|
||||||
|
|
||||||
// in the end, we null this, so we have to check if it's null
|
// in the end, we null this, so we have to check if it's null
|
||||||
if (m_imageManager != null)
|
if (m_imageManager != null)
|
||||||
{
|
{
|
||||||
m_imageManager.EnqueueReq(args);
|
m_imageManager.EnqueueReq(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8275,7 +8309,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8283,8 +8317,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;
|
||||||
}
|
}
|
||||||
|
@ -11246,23 +11284,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (m_debugPacketLevel > 0)
|
if (m_debugPacketLevel > 0)
|
||||||
{
|
{
|
||||||
bool outputPacket = true;
|
bool logPacket = true;
|
||||||
|
|
||||||
if (m_debugPacketLevel <= 255
|
if (m_debugPacketLevel <= 255
|
||||||
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
|
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
|
||||||
outputPacket = false;
|
logPacket = false;
|
||||||
|
|
||||||
if (m_debugPacketLevel <= 200
|
if (m_debugPacketLevel <= 200
|
||||||
&& (packet.Type == PacketType.ImagePacket
|
&& (packet.Type == PacketType.ImagePacket
|
||||||
|| packet.Type == PacketType.ImageData
|
|| packet.Type == PacketType.ImageData
|
||||||
|| packet.Type == PacketType.LayerData
|
|| packet.Type == PacketType.LayerData
|
||||||
|| packet.Type == PacketType.CoarseLocationUpdate))
|
|| packet.Type == PacketType.CoarseLocationUpdate))
|
||||||
outputPacket = false;
|
logPacket = false;
|
||||||
|
|
||||||
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
|
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
|
||||||
outputPacket = false;
|
logPacket = false;
|
||||||
|
|
||||||
if (outputPacket)
|
if (m_debugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate)
|
||||||
|
logPacket = false;
|
||||||
|
|
||||||
|
if (logPacket)
|
||||||
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
|
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11992,7 +12033,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
//ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
|
//ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
|
||||||
// AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient)));
|
// AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID,
|
||||||
|
PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
PlacesReplyPacket reply = null;
|
||||||
|
PlacesReplyPacket.QueryDataBlock[] dataBlocks =
|
||||||
|
new PlacesReplyPacket.QueryDataBlock[0];
|
||||||
|
|
||||||
|
for (int i = 0 ; i < data.Length ; i++)
|
||||||
|
{
|
||||||
|
PlacesReplyPacket.QueryDataBlock block =
|
||||||
|
new PlacesReplyPacket.QueryDataBlock();
|
||||||
|
|
||||||
|
block.OwnerID = data[i].OwnerID;
|
||||||
|
block.Name = Util.StringToBytes256(data[i].Name);
|
||||||
|
block.Desc = Util.StringToBytes1024(data[i].Desc);
|
||||||
|
block.ActualArea = data[i].ActualArea;
|
||||||
|
block.BillableArea = data[i].BillableArea;
|
||||||
|
block.Flags = data[i].Flags;
|
||||||
|
block.GlobalX = data[i].GlobalX;
|
||||||
|
block.GlobalY = data[i].GlobalY;
|
||||||
|
block.GlobalZ = data[i].GlobalZ;
|
||||||
|
block.SimName = Util.StringToBytes256(data[i].SimName);
|
||||||
|
block.SnapshotID = data[i].SnapshotID;
|
||||||
|
block.Dwell = data[i].Dwell;
|
||||||
|
block.Price = data[i].Price;
|
||||||
|
|
||||||
|
if (reply != null && reply.Length + block.Length > 1400)
|
||||||
|
{
|
||||||
|
OutPacket(reply, ThrottleOutPacketType.Task);
|
||||||
|
|
||||||
|
reply = null;
|
||||||
|
dataBlocks = new PlacesReplyPacket.QueryDataBlock[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reply == null)
|
||||||
|
{
|
||||||
|
reply = (PlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.PlacesReply);
|
||||||
|
reply.AgentData = new PlacesReplyPacket.AgentDataBlock();
|
||||||
|
reply.AgentData.AgentID = AgentId;
|
||||||
|
reply.AgentData.QueryID = queryID;
|
||||||
|
|
||||||
|
reply.TransactionData = new PlacesReplyPacket.TransactionDataBlock();
|
||||||
|
reply.TransactionData.TransactionID = transactionID;
|
||||||
|
|
||||||
|
reply.QueryData = dataBlocks;
|
||||||
|
}
|
||||||
|
|
||||||
|
Array.Resize(ref dataBlocks, dataBlocks.Length + 1);
|
||||||
|
dataBlocks[dataBlocks.Length - 1] = block;
|
||||||
|
reply.QueryData = dataBlocks;
|
||||||
|
}
|
||||||
|
if (reply != null)
|
||||||
|
OutPacket(reply, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,302 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
|
||||||
using log4net;
|
|
||||||
using Nini.Config;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
|
||||||
using BlockingQueue = OpenSim.Framework.BlockingQueue<OpenSim.Region.Framework.Interfaces.ITextureSender>;
|
|
||||||
using OpenSim.Services.Interfaces;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|
||||||
{
|
|
||||||
public class TextureDownloadModule : IRegionModule
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log
|
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// There is one queue for all textures waiting to be sent, regardless of the requesting user.
|
|
||||||
/// </summary>
|
|
||||||
private readonly BlockingQueue m_queueSenders
|
|
||||||
= new BlockingQueue();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Each user has their own texture download service.
|
|
||||||
/// </summary>
|
|
||||||
private readonly Dictionary<UUID, UserTextureDownloadService> m_userTextureServices =
|
|
||||||
new Dictionary<UUID, UserTextureDownloadService>();
|
|
||||||
|
|
||||||
private Scene m_scene;
|
|
||||||
private List<Scene> m_scenes = new List<Scene>();
|
|
||||||
|
|
||||||
public TextureDownloadModule()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IRegionModule Members
|
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (m_scene == null)
|
|
||||||
{
|
|
||||||
//m_log.Debug("Creating Texture download module");
|
|
||||||
m_scene = scene;
|
|
||||||
//m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
|
|
||||||
//m_thread.Name = "ProcessTextureSenderThread";
|
|
||||||
//m_thread.IsBackground = true;
|
|
||||||
//m_thread.Start();
|
|
||||||
//ThreadTracker.Add(m_thread);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_scenes.Contains(scene))
|
|
||||||
{
|
|
||||||
m_scenes.Add(scene);
|
|
||||||
m_scene = scene;
|
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
|
||||||
m_scene.EventManager.OnRemovePresence += EventManager_OnRemovePresence;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get { return "TextureDownloadModule"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Cleanup the texture service related objects for the removed presence.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="agentId"> </param>
|
|
||||||
private void EventManager_OnRemovePresence(UUID agentId)
|
|
||||||
{
|
|
||||||
UserTextureDownloadService textureService;
|
|
||||||
|
|
||||||
lock (m_userTextureServices)
|
|
||||||
{
|
|
||||||
if (m_userTextureServices.TryGetValue(agentId, out textureService))
|
|
||||||
{
|
|
||||||
textureService.Close();
|
|
||||||
//m_log.DebugFormat("[TEXTURE MODULE]: Removing UserTextureServices from {0}", m_scene.RegionInfo.RegionName);
|
|
||||||
m_userTextureServices.Remove(agentId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NewClient(IClientAPI client)
|
|
||||||
{
|
|
||||||
UserTextureDownloadService textureService;
|
|
||||||
|
|
||||||
lock (m_userTextureServices)
|
|
||||||
{
|
|
||||||
if (m_userTextureServices.TryGetValue(client.AgentId, out textureService))
|
|
||||||
{
|
|
||||||
textureService.Close();
|
|
||||||
//m_log.DebugFormat("[TEXTURE MODULE]: Removing outdated UserTextureServices from {0}", m_scene.RegionInfo.RegionName);
|
|
||||||
m_userTextureServices.Remove(client.AgentId);
|
|
||||||
}
|
|
||||||
m_userTextureServices.Add(client.AgentId, new UserTextureDownloadService(client, m_scene, m_queueSenders));
|
|
||||||
}
|
|
||||||
|
|
||||||
client.OnRequestTexture += TextureRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// I'm commenting this out, and replacing it with the implementation below, which
|
|
||||||
/// may return a null value. This is necessary for avoiding race conditions
|
|
||||||
/// recreating UserTextureServices for clients that have just been closed.
|
|
||||||
/// That behavior of always returning a UserTextureServices was causing the
|
|
||||||
/// A-B-A problem (mantis #2855).
|
|
||||||
///
|
|
||||||
///// <summary>
|
|
||||||
///// Does this user have a registered texture download service?
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="userID"></param>
|
|
||||||
///// <param name="textureService"></param>
|
|
||||||
///// <returns>Always returns true, since a service is created if one does not already exist</returns>
|
|
||||||
//private bool TryGetUserTextureService(
|
|
||||||
// IClientAPI client, out UserTextureDownloadService textureService)
|
|
||||||
//{
|
|
||||||
// lock (m_userTextureServices)
|
|
||||||
// {
|
|
||||||
// if (m_userTextureServices.TryGetValue(client.AgentId, out textureService))
|
|
||||||
// {
|
|
||||||
// //m_log.DebugFormat("[TEXTURE MODULE]: Found existing UserTextureServices in ", m_scene.RegionInfo.RegionName);
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// m_log.DebugFormat("[TEXTURE MODULE]: Creating new UserTextureServices in ", m_scene.RegionInfo.RegionName);
|
|
||||||
// textureService = new UserTextureDownloadService(client, m_scene, m_queueSenders);
|
|
||||||
// m_userTextureServices.Add(client.AgentId, textureService);
|
|
||||||
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Does this user have a registered texture download service?
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userID"></param>
|
|
||||||
/// <param name="textureService"></param>
|
|
||||||
/// <returns>A UserTextureDownloadService or null in the output parameter, and true or false accordingly.</returns>
|
|
||||||
private bool TryGetUserTextureService(IClientAPI client, out UserTextureDownloadService textureService)
|
|
||||||
{
|
|
||||||
lock (m_userTextureServices)
|
|
||||||
{
|
|
||||||
if (m_userTextureServices.TryGetValue(client.AgentId, out textureService))
|
|
||||||
{
|
|
||||||
//m_log.DebugFormat("[TEXTURE MODULE]: Found existing UserTextureServices in ", m_scene.RegionInfo.RegionName);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
textureService = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Start the process of requesting a given texture.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"> </param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
public void TextureRequest(Object sender, TextureRequestArgs e)
|
|
||||||
{
|
|
||||||
IClientAPI client = (IClientAPI)sender;
|
|
||||||
|
|
||||||
if (e.Priority == 1016001f) // Preview
|
|
||||||
{
|
|
||||||
if (client.Scene is Scene)
|
|
||||||
{
|
|
||||||
Scene scene = (Scene)client.Scene;
|
|
||||||
|
|
||||||
ScenePresence sp = scene.GetScenePresence(client.AgentId);
|
|
||||||
if (sp == null) // Deny unknown user
|
|
||||||
return;
|
|
||||||
|
|
||||||
IInventoryService invService = scene.InventoryService;
|
|
||||||
if (invService.GetRootFolder(client.AgentId) == null) // Deny no inventory
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Diva 2009-08-13: this test doesn't make any sense to many devs
|
|
||||||
//if (profile.UserProfile.GodLevel < 200 && profile.RootFolder.FindAsset(e.RequestedAssetID) == null) // Deny if not owned
|
|
||||||
//{
|
|
||||||
// m_log.WarnFormat("[TEXTURE]: user {0} doesn't have permissions to texture {1}");
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
m_log.Debug("Texture preview");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UserTextureDownloadService textureService;
|
|
||||||
|
|
||||||
if (TryGetUserTextureService(client, out textureService))
|
|
||||||
{
|
|
||||||
textureService.HandleTextureRequest(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Entry point for the thread dedicated to processing the texture queue.
|
|
||||||
/// </summary>
|
|
||||||
public void ProcessTextureSenders()
|
|
||||||
{
|
|
||||||
ITextureSender sender = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
sender = m_queueSenders.Dequeue();
|
|
||||||
|
|
||||||
if (sender.Cancel)
|
|
||||||
{
|
|
||||||
TextureSent(sender);
|
|
||||||
|
|
||||||
sender.Cancel = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bool finished = sender.SendTexturePacket();
|
|
||||||
if (finished)
|
|
||||||
{
|
|
||||||
TextureSent(sender);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_queueSenders.Enqueue(sender);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure that any sender we currently have can get garbage collected
|
|
||||||
sender = null;
|
|
||||||
|
|
||||||
//m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
// TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
|
|
||||||
e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when the texture has finished sending.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
private void TextureSent(ITextureSender sender)
|
|
||||||
{
|
|
||||||
sender.Sending = false;
|
|
||||||
//m_log.DebugFormat("[TEXTURE]: Removing download stat for {0}", sender.assetID);
|
|
||||||
m_scene.StatsReporter.AddPendingDownloads(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,87 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Sends a 'texture not found' packet back to the client
|
|
||||||
/// </summary>
|
|
||||||
public class TextureNotFoundSender : ITextureSender
|
|
||||||
{
|
|
||||||
// private static readonly log4net.ILog m_log
|
|
||||||
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
// private IClientAPI m_client;
|
|
||||||
// private UUID m_textureId;
|
|
||||||
|
|
||||||
public TextureNotFoundSender(IClientAPI client, UUID textureID)
|
|
||||||
{
|
|
||||||
//m_client = client;
|
|
||||||
//m_textureId = textureID;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region ITextureSender Members
|
|
||||||
|
|
||||||
public bool Sending
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
set { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Cancel
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
set { }
|
|
||||||
}
|
|
||||||
|
|
||||||
// See ITextureSender
|
|
||||||
public void UpdateRequest(int discardLevel, uint packetNumber)
|
|
||||||
{
|
|
||||||
// No need to implement since priority changes don't affect this operation
|
|
||||||
}
|
|
||||||
|
|
||||||
// See ITextureSender
|
|
||||||
public bool SendTexturePacket()
|
|
||||||
{
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found",
|
|
||||||
// m_textureId);
|
|
||||||
|
|
||||||
// XXX Temporarily disabling as this appears to be causing client crashes on at least
|
|
||||||
// 1.19.0(5) of the Linden Second Life client.
|
|
||||||
// m_client.SendImageNotFound(m_textureId);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,265 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Framework.Communications.Limit;
|
|
||||||
using OpenSim.Framework.Statistics;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This module sets up texture senders in response to client texture requests, and places them on a
|
|
||||||
/// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the
|
|
||||||
/// asset cache).
|
|
||||||
/// </summary>
|
|
||||||
public class UserTextureDownloadService
|
|
||||||
{
|
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// True if the service has been closed, probably because a user with texture requests still queued
|
|
||||||
/// logged out.
|
|
||||||
/// </summary>
|
|
||||||
private bool closed;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// We will allow the client to request the same texture n times before dropping further requests
|
|
||||||
///
|
|
||||||
/// This number includes repeated requests for the same texture at different resolutions (which we don't
|
|
||||||
/// currently handle properly as far as I know). However, this situation should be handled in a more
|
|
||||||
/// sophisticated way.
|
|
||||||
/// </summary>
|
|
||||||
// private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// XXX Also going to limit requests for found textures.
|
|
||||||
/// </summary>
|
|
||||||
// private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy
|
|
||||||
// = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
|
|
||||||
|
|
||||||
// private readonly IClientAPI m_client;
|
|
||||||
private readonly Scene m_scene;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Texture Senders are placed in this queue once they have received their texture from the asset
|
|
||||||
/// cache. Another module actually invokes the send.
|
|
||||||
/// </summary>
|
|
||||||
// private readonly OpenSim.Framework.BlockingQueue<ITextureSender> m_sharedSendersQueue;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Holds texture senders before they have received the appropriate texture from the asset cache.
|
|
||||||
/// </summary>
|
|
||||||
private readonly Dictionary<UUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<UUID, TextureSender.TextureSender>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// We're going to limit requests for the same missing texture.
|
|
||||||
/// XXX This is really a temporary solution to deal with the situation where a client continually requests
|
|
||||||
/// the same missing textures
|
|
||||||
/// </summary>
|
|
||||||
// private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
|
|
||||||
// = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
|
|
||||||
|
|
||||||
public UserTextureDownloadService(
|
|
||||||
IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue<ITextureSender> sharedQueue)
|
|
||||||
{
|
|
||||||
// m_client = client;
|
|
||||||
m_scene = scene;
|
|
||||||
// m_sharedSendersQueue = sharedQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Handle a texture request. This involves creating a texture sender and placing it on the
|
|
||||||
/// previously passed in shared queue.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
public void HandleTextureRequest(TextureRequestArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
//TextureSender.TextureSender textureSender;
|
|
||||||
|
|
||||||
//TODO: should be working out the data size/ number of packets to be sent for each discard level
|
|
||||||
//if ((e.DiscardLevel >= 0) || (e.Priority != 0))
|
|
||||||
//{
|
|
||||||
//lock (m_textureSenders)
|
|
||||||
//{
|
|
||||||
//if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender))
|
|
||||||
//{
|
|
||||||
// If we've received new non UUID information for this request and it hasn't dispatched
|
|
||||||
// yet, then update the request accordingly.
|
|
||||||
// textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber);
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// m_log.DebugFormat("[TEXTURE]: Received a request for texture {0}", e.RequestedAssetID);
|
|
||||||
|
|
||||||
//if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID))
|
|
||||||
//{
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[TEXTURE]: Refusing request for {0} from client {1}",
|
|
||||||
// e.RequestedAssetID, m_client.AgentId);
|
|
||||||
|
|
||||||
//return;
|
|
||||||
//}
|
|
||||||
//else if (!missingTextureLimitStrategy.AllowRequest(e.RequestedAssetID))
|
|
||||||
//{
|
|
||||||
// if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID))
|
|
||||||
// {
|
|
||||||
// if (StatsManager.SimExtraStats != null)
|
|
||||||
// StatsManager.SimExtraStats.AddBlockedMissingTextureRequest();
|
|
||||||
|
|
||||||
// Commenting out this message for now as it causes too much noise with other
|
|
||||||
// debug messages.
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[TEXTURE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests",
|
|
||||||
// e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
m_scene.StatsReporter.AddPendingDownloads(1);
|
|
||||||
|
|
||||||
//TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
|
|
||||||
//m_textureSenders.Add(e.RequestedAssetID, null);
|
|
||||||
|
|
||||||
m_scene.AssetService.Get(e.RequestedAssetID.ToString(), this, TextureReceived);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void TextureReceived(string id, Object sender, AssetBase asset)
|
|
||||||
{
|
|
||||||
if (asset != null)
|
|
||||||
TextureCallback(asset.FullID, asset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The callback for the asset cache when a texture has been retrieved. This method queues the
|
|
||||||
/// texture sender for processing.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="textureID"></param>
|
|
||||||
/// <param name="texture"></param>
|
|
||||||
public void TextureCallback(UUID textureID, AssetBase texture)
|
|
||||||
{
|
|
||||||
//m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false));
|
|
||||||
|
|
||||||
// There may still be texture requests pending for a logged out client
|
|
||||||
if (closed)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
lock (m_textureSenders)
|
|
||||||
{
|
|
||||||
TextureSender.TextureSender textureSender;
|
|
||||||
if (m_textureSenders.TryGetValue(textureID, out textureSender))
|
|
||||||
{
|
|
||||||
// XXX It may be perfectly valid for a texture to have no data... but if we pass
|
|
||||||
// this on to the TextureSender it will blow up, so just discard for now.
|
|
||||||
// Needs investigation.
|
|
||||||
if (texture == null || texture.Data == null)
|
|
||||||
{
|
|
||||||
if (!missingTextureLimitStrategy.IsMonitoringRequests(textureID))
|
|
||||||
{
|
|
||||||
missingTextureLimitStrategy.MonitorRequests(textureID);
|
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[TEXTURE]: Queueing first TextureNotFoundSender for {0}, client {1}",
|
|
||||||
// textureID, m_client.AgentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID);
|
|
||||||
EnqueueTextureSender(textureNotFoundSender);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!textureSender.ImageLoaded)
|
|
||||||
{
|
|
||||||
textureSender.TextureReceived(texture);
|
|
||||||
EnqueueTextureSender(textureSender);
|
|
||||||
|
|
||||||
foundTextureLimitStrategy.MonitorRequests(textureID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//m_log.InfoFormat("[TEXTURE] Removing texture sender with uuid {0}", textureID);
|
|
||||||
m_textureSenders.Remove(textureID);
|
|
||||||
//m_log.InfoFormat("[TEXTURE] Current texture senders in dictionary: {0}", m_textureSenders.Count);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.WarnFormat(
|
|
||||||
"[TEXTURE]: Got a texture uuid {0} with no sender object to handle it, this shouldn't happen",
|
|
||||||
textureID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Place a ready texture sender on the processing queue.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="textureSender"></param>
|
|
||||||
// private void EnqueueTextureSender(ITextureSender textureSender)
|
|
||||||
// {
|
|
||||||
// textureSender.Cancel = false;
|
|
||||||
// textureSender.Sending = true;
|
|
||||||
//
|
|
||||||
// if (!m_sharedSendersQueue.Contains(textureSender))
|
|
||||||
// {
|
|
||||||
// m_sharedSendersQueue.Enqueue(textureSender);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Close this module.
|
|
||||||
/// </summary>
|
|
||||||
internal void Close()
|
|
||||||
{
|
|
||||||
closed = true;
|
|
||||||
|
|
||||||
lock (m_textureSenders)
|
|
||||||
{
|
|
||||||
foreach (TextureSender.TextureSender textureSender in m_textureSenders.Values)
|
|
||||||
{
|
|
||||||
textureSender.Cancel = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_textureSenders.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX: It might be possible to also remove pending texture requests from the asset cache queues,
|
|
||||||
// though this might also be more trouble than it's worth.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,212 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A TextureSender handles the process of receiving a texture requested by the client from the
|
|
||||||
/// AssetCache, and then sending that texture back to the client.
|
|
||||||
/// </summary>
|
|
||||||
public class TextureSender : ITextureSender
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log
|
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Records the number of times texture send has been called.
|
|
||||||
/// </summary>
|
|
||||||
public int counter = 0;
|
|
||||||
|
|
||||||
public bool ImageLoaded = false;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Holds the texture asset to send.
|
|
||||||
/// </summary>
|
|
||||||
private AssetBase m_asset;
|
|
||||||
|
|
||||||
//public UUID assetID { get { return m_asset.FullID; } }
|
|
||||||
|
|
||||||
// private bool m_cancel = false;
|
|
||||||
|
|
||||||
// See ITextureSender
|
|
||||||
|
|
||||||
// private bool m_sending = false;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This is actually the number of extra packets required to send the texture data! We always assume
|
|
||||||
/// at least one is required.
|
|
||||||
/// </summary>
|
|
||||||
private int NumPackets = 0;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts
|
|
||||||
/// at the 600th byte (0th indexed).
|
|
||||||
/// </summary>
|
|
||||||
private int PacketCounter = 0;
|
|
||||||
|
|
||||||
private int RequestedDiscardLevel = -1;
|
|
||||||
private IClientAPI RequestUser;
|
|
||||||
private uint StartPacketNumber = 0;
|
|
||||||
|
|
||||||
public TextureSender(IClientAPI client, int discardLevel, uint packetNumber)
|
|
||||||
{
|
|
||||||
RequestUser = client;
|
|
||||||
RequestedDiscardLevel = discardLevel;
|
|
||||||
StartPacketNumber = packetNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region ITextureSender Members
|
|
||||||
|
|
||||||
public bool Cancel
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
// m_cancel = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Sending
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
// m_sending = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See ITextureSender
|
|
||||||
public void UpdateRequest(int discardLevel, uint packetNumber)
|
|
||||||
{
|
|
||||||
RequestedDiscardLevel = discardLevel;
|
|
||||||
StartPacketNumber = packetNumber;
|
|
||||||
PacketCounter = (int)StartPacketNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
// See ITextureSender
|
|
||||||
public bool SendTexturePacket()
|
|
||||||
{
|
|
||||||
//m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.FullID);
|
|
||||||
|
|
||||||
SendPacket();
|
|
||||||
counter++;
|
|
||||||
if ((NumPackets == 0) || (RequestedDiscardLevel == -1) || (PacketCounter > NumPackets) ||
|
|
||||||
((RequestedDiscardLevel > 0) && (counter > 50 + (NumPackets / (RequestedDiscardLevel + 1)))))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Load up the texture data to send.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="asset"></param>
|
|
||||||
public void TextureReceived(AssetBase asset)
|
|
||||||
{
|
|
||||||
m_asset = asset;
|
|
||||||
NumPackets = CalculateNumPackets(asset.Data.Length);
|
|
||||||
PacketCounter = (int)StartPacketNumber;
|
|
||||||
ImageLoaded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sends a texture packet to the client.
|
|
||||||
/// </summary>
|
|
||||||
private void SendPacket()
|
|
||||||
{
|
|
||||||
if (PacketCounter <= NumPackets)
|
|
||||||
{
|
|
||||||
if (PacketCounter == 0)
|
|
||||||
{
|
|
||||||
if (NumPackets == 0)
|
|
||||||
{
|
|
||||||
RequestUser.SendImageFirstPart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2);
|
|
||||||
PacketCounter++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
byte[] ImageData1 = new byte[600];
|
|
||||||
Array.Copy(m_asset.Data, 0, ImageData1, 0, 600);
|
|
||||||
|
|
||||||
RequestUser.SendImageFirstPart(
|
|
||||||
(ushort)(NumPackets), m_asset.FullID, (uint)m_asset.Data.Length, ImageData1, 2);
|
|
||||||
PacketCounter++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1));
|
|
||||||
if (size > 1000) size = 1000;
|
|
||||||
byte[] imageData = new byte[size];
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), imageData, 0, size);
|
|
||||||
}
|
|
||||||
catch (ArgumentOutOfRangeException)
|
|
||||||
{
|
|
||||||
m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" +
|
|
||||||
m_asset.ID);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData);
|
|
||||||
PacketCounter++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Calculate the number of packets that will be required to send the texture loaded into this sender
|
|
||||||
/// This is actually the number of 1000 byte packets not including an initial 600 byte packet...
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="length"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private int CalculateNumPackets(int length)
|
|
||||||
{
|
|
||||||
int numPackets = 0;
|
|
||||||
|
|
||||||
if (length > 600)
|
|
||||||
{
|
|
||||||
//over 600 bytes so split up file
|
|
||||||
int restData = (length - 600);
|
|
||||||
int restPackets = ((restData + 999) / 1000);
|
|
||||||
numPackets = restPackets;
|
|
||||||
}
|
|
||||||
|
|
||||||
return numPackets;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -27,7 +27,9 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
using log4net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -38,11 +40,10 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
public class XferModule : IRegionModule, IXfer
|
public class XferModule : IRegionModule, IXfer
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>();
|
private Dictionary<string, FileData> NewFiles = new Dictionary<string, FileData>();
|
||||||
private List<XferRequest> RequestTime = new List<XferRequest>();
|
private Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>();
|
||||||
public Dictionary<string, byte[]> NewFiles = new Dictionary<string, byte[]>();
|
|
||||||
public Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>();
|
|
||||||
|
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public struct XferRequest
|
public struct XferRequest
|
||||||
{
|
{
|
||||||
|
@ -52,6 +53,12 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
public DateTime timeStamp;
|
public DateTime timeStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class FileData
|
||||||
|
{
|
||||||
|
public byte[] Data;
|
||||||
|
public int Count;
|
||||||
|
}
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region IRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
|
@ -84,26 +91,32 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
|
|
||||||
#region IXfer Members
|
#region IXfer Members
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Let the Xfer module know about a file that the client is about to request.
|
||||||
|
/// Caller is responsible for making sure that the file is here before
|
||||||
|
/// the client starts the XferRequest.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName"></param>
|
||||||
|
/// <param name="data"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public bool AddNewFile(string fileName, byte[] data)
|
public bool AddNewFile(string fileName, byte[] data)
|
||||||
{
|
{
|
||||||
lock (NewFiles)
|
lock (NewFiles)
|
||||||
{
|
{
|
||||||
if (NewFiles.ContainsKey(fileName))
|
if (NewFiles.ContainsKey(fileName))
|
||||||
{
|
{
|
||||||
NewFiles[fileName] = data;
|
NewFiles[fileName].Count++;
|
||||||
|
NewFiles[fileName].Data = data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NewFiles.Add(fileName, data);
|
FileData fd = new FileData();
|
||||||
|
fd.Count = 1;
|
||||||
|
fd.Data = data;
|
||||||
|
NewFiles.Add(fileName, fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Requests.ContainsKey(fileName))
|
|
||||||
{
|
|
||||||
RequestXfer(Requests[fileName].remoteClient, Requests[fileName].xferID, fileName);
|
|
||||||
Requests.Remove(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,6 +126,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
{
|
{
|
||||||
client.OnRequestXfer += RequestXfer;
|
client.OnRequestXfer += RequestXfer;
|
||||||
client.OnConfirmXfer += AckPacket;
|
client.OnConfirmXfer += AckPacket;
|
||||||
|
client.OnAbortXfer += AbortXfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -129,55 +143,76 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
{
|
{
|
||||||
if (!Transfers.ContainsKey(xferID))
|
if (!Transfers.ContainsKey(xferID))
|
||||||
{
|
{
|
||||||
byte[] fileData = NewFiles[fileName];
|
byte[] fileData = NewFiles[fileName].Data;
|
||||||
XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
|
XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
|
||||||
|
|
||||||
Transfers.Add(xferID, transaction);
|
Transfers.Add(xferID, transaction);
|
||||||
NewFiles.Remove(fileName);
|
|
||||||
|
|
||||||
if (transaction.StartSend())
|
if (transaction.StartSend())
|
||||||
{
|
RemoveXferData(xferID);
|
||||||
Transfers.Remove(xferID);
|
|
||||||
}
|
// The transaction for this file is either complete or on its way
|
||||||
|
RemoveOrDecrement(fileName);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
m_log.WarnFormat("[Xfer]: {0} not found", fileName);
|
||||||
if (RequestTime.Count > 0)
|
|
||||||
{
|
|
||||||
TimeSpan ts = new TimeSpan(DateTime.UtcNow.Ticks - RequestTime[0].timeStamp.Ticks);
|
|
||||||
if (ts.TotalSeconds > 30)
|
|
||||||
{
|
|
||||||
Requests.Remove(RequestTime[0].fileName);
|
|
||||||
RequestTime.RemoveAt(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Requests.ContainsKey(fileName))
|
|
||||||
{
|
|
||||||
XferRequest nRequest = new XferRequest();
|
|
||||||
nRequest.remoteClient = remoteClient;
|
|
||||||
nRequest.xferID = xferID;
|
|
||||||
nRequest.fileName = fileName;
|
|
||||||
nRequest.timeStamp = DateTime.UtcNow;
|
|
||||||
Requests.Add(fileName, nRequest);
|
|
||||||
RequestTime.Add(nRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet)
|
public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet)
|
||||||
|
{
|
||||||
|
lock (NewFiles) // This is actually to lock Transfers
|
||||||
{
|
{
|
||||||
if (Transfers.ContainsKey(xferID))
|
if (Transfers.ContainsKey(xferID))
|
||||||
{
|
{
|
||||||
|
XferDownLoad dl = Transfers[xferID];
|
||||||
if (Transfers[xferID].AckPacket(packet))
|
if (Transfers[xferID].AckPacket(packet))
|
||||||
{
|
{
|
||||||
|
RemoveXferData(xferID);
|
||||||
|
RemoveOrDecrement(dl.FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveXferData(ulong xferID)
|
||||||
{
|
{
|
||||||
|
// NewFiles must be locked!
|
||||||
|
if (Transfers.ContainsKey(xferID))
|
||||||
|
{
|
||||||
|
XferModule.XferDownLoad xferItem = Transfers[xferID];
|
||||||
|
//string filename = xferItem.FileName;
|
||||||
Transfers.Remove(xferID);
|
Transfers.Remove(xferID);
|
||||||
|
xferItem.Data = new byte[0]; // Clear the data
|
||||||
|
xferItem.DataPointer = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AbortXfer(IClientAPI remoteClient, ulong xferID)
|
||||||
|
{
|
||||||
|
lock (NewFiles)
|
||||||
|
{
|
||||||
|
if (Transfers.ContainsKey(xferID))
|
||||||
|
RemoveOrDecrement(Transfers[xferID].FileName);
|
||||||
|
|
||||||
|
RemoveXferData(xferID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveOrDecrement(string fileName)
|
||||||
|
{
|
||||||
|
// NewFiles must be locked
|
||||||
|
|
||||||
|
if (NewFiles.ContainsKey(fileName))
|
||||||
|
{
|
||||||
|
if (NewFiles[fileName].Count == 1)
|
||||||
|
NewFiles.Remove(fileName);
|
||||||
|
else
|
||||||
|
NewFiles[fileName].Count--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -621,8 +621,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})",
|
m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0} the host didn't respond " + e.ToString(), reginfo.ServerURI.ToString());
|
||||||
reginfo.ServerURI, e.Message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
/// The maximum major version of archive that we can read. Minor versions shouldn't need a max number since version
|
/// The maximum major version of archive that we can read. Minor versions shouldn't need a max number since version
|
||||||
/// bumps here should be compatible.
|
/// bumps here should be compatible.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int MAX_MAJOR_VERSION = 0;
|
public static int MAX_MAJOR_VERSION = 1;
|
||||||
|
|
||||||
protected TarArchiveReader archive;
|
protected TarArchiveReader archive;
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -109,12 +109,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
this, "load iar",
|
this, "load iar",
|
||||||
"load iar <first> <last> <inventory path> <password> [<IAR path>]",
|
"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]",
|
||||||
//"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]",
|
|
||||||
"Load user inventory archive (IAR).",
|
"Load user inventory archive (IAR).",
|
||||||
//"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones"
|
"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones"
|
||||||
//+ "<first> is user's first name." + Environment.NewLine
|
+ "<first> is user's first name." + Environment.NewLine
|
||||||
"<first> is user's first name." + Environment.NewLine
|
|
||||||
+ "<last> is user's last name." + Environment.NewLine
|
+ "<last> is user's last name." + Environment.NewLine
|
||||||
+ "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
|
+ "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
|
||||||
+ "<password> is the user's password." + Environment.NewLine
|
+ "<password> is the user's password." + Environment.NewLine
|
||||||
|
@ -124,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
this, "save iar",
|
this, "save iar",
|
||||||
"save iar <first> <last> <inventory path> <password> [--p|-profile=<url>] [<IAR path>]",
|
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>]",
|
||||||
"Save user inventory archive (IAR).",
|
"Save user inventory archive (IAR).",
|
||||||
"<first> is the user's first name." + Environment.NewLine
|
"<first> is the user's first name." + Environment.NewLine
|
||||||
+ "<last> is the user's last name." + Environment.NewLine
|
+ "<last> is the user's last name." + Environment.NewLine
|
||||||
|
@ -172,8 +170,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 +187,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 +210,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 +227,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 +255,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 +277,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 +303,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 +325,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);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +402,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
if (mainParams.Count < 6)
|
if (mainParams.Count < 6)
|
||||||
{
|
{
|
||||||
m_log.Error(
|
m_log.Error(
|
||||||
"[INVENTORY ARCHIVER]: usage is save iar <first name> <last name> <inventory path> <user password> [<save file path>]");
|
"[INVENTORY ARCHIVER]: usage is save iar [--p|-profile=<url>] <first name> <last name> <inventory path> <user password> [<save file path>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,28 +526,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();
|
||||||
|
|
|
@ -1301,7 +1301,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
|
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
|
||||||
m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
|
m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX / Constants.RegionSize, otherRegion.RegionLocY / Constants.RegionSize);
|
||||||
|
|
||||||
m_neighbours[otherRegion.RegionHandle] = otherRegion;
|
m_neighbours[otherRegion.RegionHandle] = otherRegion;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,13 +36,13 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Services.Connectors;
|
using OpenSim.Services.Connectors;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Server.Base;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
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 +51,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 +74,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,7 +98,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Initialise(source);
|
string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);
|
||||||
|
if (networkConnector == string.Empty)
|
||||||
|
{
|
||||||
|
m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object[] args = new Object[] { source };
|
||||||
|
m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args);
|
||||||
|
|
||||||
m_LocalGridService = new LocalGridServicesConnector(source);
|
m_LocalGridService = new LocalGridServicesConnector(source);
|
||||||
}
|
}
|
||||||
|
@ -135,61 +144,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 +211,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,
|
||||||
|
int sections, List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
IClientAPI remote_client)
|
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
|
||||||
{
|
{
|
||||||
|
@ -198,37 +199,82 @@ 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
|
//Needs later group support
|
||||||
bool snap_selection = false;
|
bool snap_selection = false;
|
||||||
LandData newData = LandData.Copy();
|
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))
|
||||||
{
|
{
|
||||||
if (m_scene.Permissions.CanSellParcel(remote_client.AgentId, this))
|
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)
|
||||||
{
|
{
|
||||||
newData.AuthBuyerID = args.AuthBuyerID;
|
|
||||||
newData.SalePrice = args.SalePrice;
|
|
||||||
snap_selection = true;
|
snap_selection = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
newData.Category = args.Category;
|
newData.AuthBuyerID = args.AuthBuyerID;
|
||||||
newData.Description = args.Desc;
|
newData.SalePrice = args.SalePrice;
|
||||||
|
|
||||||
|
if (!LandData.IsGroupOwned)
|
||||||
|
{
|
||||||
newData.GroupID = args.GroupID;
|
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;
|
||||||
|
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.ShowDirectory |
|
||||||
|
ParcelFlags.AllowPublish |
|
||||||
|
ParcelFlags.MaturePublish);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity))
|
||||||
|
{
|
||||||
|
newData.Description = args.Desc;
|
||||||
|
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,11 +283,41 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
newData.ObscureMusic = args.ObscureMusic;
|
newData.ObscureMusic = args.ObscureMusic;
|
||||||
newData.ObscureMedia = args.ObscureMedia;
|
newData.ObscureMedia = args.ObscureMedia;
|
||||||
|
|
||||||
|
allowedDelta |= (uint)(ParcelFlags.SoundLocal |
|
||||||
|
ParcelFlags.UrlWebPage |
|
||||||
|
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);
|
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||||
|
|
||||||
SendLandUpdateToAvatarsOverMe(snap_selection);
|
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,40 +496,53 @@ 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 = new List<ParcelManager.ParcelAccessEntry>();
|
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
||||||
{
|
{
|
||||||
if (entry.Flags == (AccessList)flags)
|
if (entry.Flags == (AccessList)flags)
|
||||||
{
|
|
||||||
toRemove.Add(entry);
|
toRemove.Add(entry);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
||||||
{
|
{
|
||||||
newData.ParcelAccessList.Remove(entry);
|
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 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;
|
||||||
|
@ -147,7 +148,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
||||||
regionimage = regionimage.Replace("-", "");
|
regionimage = regionimage.Replace("-", "");
|
||||||
m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage);
|
m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "index.php?method=" + regionimage);
|
||||||
|
|
||||||
MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
||||||
MainServer.Instance.AddLLSDHandler(
|
MainServer.Instance.AddLLSDHandler(
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -610,6 +610,12 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
||||||
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
||||||
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
||||||
|
@ -1167,5 +1173,9 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -197,13 +197,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// in this prim's inventory.</returns>
|
/// in this prim's inventory.</returns>
|
||||||
int RemoveInventoryItem(UUID itemID);
|
int RemoveInventoryItem(UUID itemID);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Return the name with which a client can request a xfer of this prim's inventory metadata
|
|
||||||
/// </summary>
|
|
||||||
string GetInventoryFileName();
|
|
||||||
|
|
||||||
bool GetInventoryFileName(IClientAPI client, uint localID);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
|
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
|
||||||
/// </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();
|
||||||
|
|
|
@ -234,6 +234,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;
|
||||||
}
|
}
|
||||||
|
@ -280,6 +285,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
m_animTickJump = -1;
|
m_animTickJump = -1;
|
||||||
return "JUMP";
|
return "JUMP";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return "JUMP";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -308,7 +315,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
|
|
||||||
#endregion Ground Movement
|
#endregion Ground Movement
|
||||||
|
|
||||||
return m_movementAnimation;
|
//return m_movementAnimation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -317,17 +324,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
public void UpdateMovementAnimations()
|
public void UpdateMovementAnimations()
|
||||||
{
|
{
|
||||||
m_movementAnimation = GetMovementAnimation();
|
m_movementAnimation = GetMovementAnimation();
|
||||||
|
|
||||||
if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump)
|
|
||||||
{
|
|
||||||
// This was the previous behavior before PREJUMP
|
|
||||||
TrySetMovementAnimation("JUMP");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TrySetMovementAnimation(m_movementAnimation);
|
TrySetMovementAnimation(m_movementAnimation);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public UUID[] GetAnimationArray()
|
public UUID[] GetAnimationArray()
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
public class EntityManager
|
public class EntityManager
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private readonly DoubleDictionary<UUID, uint, EntityBase> m_entities = new DoubleDictionary<UUID, uint, EntityBase>();
|
private readonly DoubleDictionary<UUID, uint, EntityBase> m_entities = new DoubleDictionary<UUID, uint, EntityBase>();
|
||||||
|
|
||||||
public int Count
|
public int Count
|
||||||
|
|
|
@ -217,21 +217,29 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
|
private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
|
||||||
{
|
|
||||||
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
|
|
||||||
if (presence != null)
|
|
||||||
{
|
{
|
||||||
// If this is an update for our own avatar give it the highest priority
|
// If this is an update for our own avatar give it the highest priority
|
||||||
if (presence == entity)
|
if (client.AgentId == entity.UUID)
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
if (entity == null)
|
||||||
|
return double.NaN;
|
||||||
|
|
||||||
// Use group position for child prims
|
// Use group position for child prims
|
||||||
Vector3 entityPos = entity.AbsolutePosition;
|
Vector3 entityPos = entity.AbsolutePosition;
|
||||||
if (entity is SceneObjectPart)
|
if (entity is SceneObjectPart)
|
||||||
entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
|
{
|
||||||
|
SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup;
|
||||||
|
if (group != null)
|
||||||
|
entityPos = group.AbsolutePosition;
|
||||||
|
else
|
||||||
|
entityPos = entity.AbsolutePosition;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
entityPos = entity.AbsolutePosition;
|
entityPos = entity.AbsolutePosition;
|
||||||
|
|
||||||
|
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
|
||||||
|
if (presence != null)
|
||||||
|
{
|
||||||
if (!presence.IsChildAgent)
|
if (!presence.IsChildAgent)
|
||||||
{
|
{
|
||||||
if (entity is ScenePresence)
|
if (entity is ScenePresence)
|
||||||
|
|
|
@ -785,10 +785,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item.
|
||||||
|
if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) && (m_permissions.BypassPermissions() || m_permissions.CanCopyUserInventory(remoteClient.AgentId, oldItemID)))
|
||||||
{
|
{
|
||||||
CreateNewInventoryItem(
|
CreateNewInventoryItem(
|
||||||
remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
|
remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID,
|
||||||
item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
asset, (sbyte) item.InvType,
|
||||||
|
item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions,
|
||||||
|
item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1026,23 +1032,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="primLocalID"></param>
|
/// <param name="primLocalID"></param>
|
||||||
public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
|
public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
SceneObjectPart part = GetSceneObjectPart(primLocalID);
|
||||||
if (group != null)
|
if (part == null)
|
||||||
{
|
return;
|
||||||
bool fileChange = group.GetPartInventoryFileName(remoteClient, primLocalID);
|
|
||||||
if (fileChange)
|
|
||||||
{
|
|
||||||
if (XferManager != null)
|
if (XferManager != null)
|
||||||
{
|
part.Inventory.RequestInventoryFile(remoteClient, XferManager);
|
||||||
group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[PRIM INVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -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);
|
||||||
|
@ -90,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public class ScenePermissions
|
public class ScenePermissions
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
|
@ -130,7 +131,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event IssueEstateCommandHandler OnIssueEstateCommand;
|
public event IssueEstateCommandHandler OnIssueEstateCommand;
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,9 +134,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// TODO: Possibly stop other classes being able to manipulate this directly.
|
// TODO: Possibly stop other classes being able to manipulate this directly.
|
||||||
private SceneGraph m_sceneGraph;
|
private SceneGraph m_sceneGraph;
|
||||||
private volatile int m_bordersLocked;
|
private volatile int m_bordersLocked;
|
||||||
private int m_RestartTimerCounter;
|
// private int m_RestartTimerCounter;
|
||||||
private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
|
private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
|
||||||
private int m_incrementsof15seconds;
|
// private int m_incrementsof15seconds;
|
||||||
private volatile bool m_backingup;
|
private volatile bool m_backingup;
|
||||||
private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>();
|
private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>();
|
||||||
private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>();
|
private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>();
|
||||||
|
@ -149,7 +149,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private int m_update_events = 1;
|
private int m_update_events = 1;
|
||||||
private int m_update_backup = 200;
|
private int m_update_backup = 200;
|
||||||
private int m_update_terrain = 50;
|
private int m_update_terrain = 50;
|
||||||
private int m_update_land = 1;
|
// private int m_update_land = 1;
|
||||||
private int m_update_coarse_locations = 50;
|
private int m_update_coarse_locations = 50;
|
||||||
|
|
||||||
private int frameMS;
|
private int frameMS;
|
||||||
|
@ -176,6 +176,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private object m_deleting_scene_object = new object();
|
private object m_deleting_scene_object = new object();
|
||||||
private object m_cleaningAttachments = new object();
|
private object m_cleaningAttachments = new object();
|
||||||
|
|
||||||
|
private bool m_cleaningTemps = false;
|
||||||
|
|
||||||
private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
|
private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
|
||||||
private bool m_reprioritizationEnabled = true;
|
private bool m_reprioritizationEnabled = true;
|
||||||
private double m_reprioritizationInterval = 5000.0;
|
private double m_reprioritizationInterval = 5000.0;
|
||||||
|
@ -185,7 +187,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private Timer m_mapGenerationTimer = new Timer();
|
private Timer m_mapGenerationTimer = new Timer();
|
||||||
private bool m_generateMaptiles;
|
private bool m_generateMaptiles;
|
||||||
|
|
||||||
private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>();
|
// private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>();
|
||||||
|
|
||||||
#endregion Fields
|
#endregion Fields
|
||||||
|
|
||||||
|
@ -980,8 +982,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize);
|
uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize);
|
||||||
uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize);
|
uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize);
|
||||||
m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
|
//m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
|
||||||
RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell);
|
// RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell);
|
||||||
|
|
||||||
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
||||||
{
|
{
|
||||||
|
@ -1503,10 +1505,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
|
physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
|
||||||
|
|
||||||
// Delete temp-on-rez stuff
|
// Delete temp-on-rez stuff
|
||||||
if (m_frame % m_update_backup == 0)
|
if (m_frame % 1000 == 0 && !m_cleaningTemps)
|
||||||
{
|
{
|
||||||
int tmpTempOnRezMS = Util.EnvironmentTickCount();
|
int tmpTempOnRezMS = Util.EnvironmentTickCount();
|
||||||
CleanTempObjects();
|
m_cleaningTemps = true;
|
||||||
|
Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
|
||||||
tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS);
|
tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1533,12 +1536,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
|
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_frame % m_update_land == 0)
|
//if (m_frame % m_update_land == 0)
|
||||||
{
|
//{
|
||||||
int ldMS = Util.EnvironmentTickCount();
|
// int ldMS = Util.EnvironmentTickCount();
|
||||||
UpdateLand();
|
// UpdateLand();
|
||||||
landMS = Util.EnvironmentTickCountSubtract(ldMS);
|
// landMS = Util.EnvironmentTickCountSubtract(ldMS);
|
||||||
}
|
//}
|
||||||
|
|
||||||
frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
|
frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
|
||||||
otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
|
otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
|
||||||
|
@ -1668,14 +1671,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private void CheckAtTargets()
|
private void CheckAtTargets()
|
||||||
{
|
{
|
||||||
|
Dictionary<UUID, SceneObjectGroup>.ValueCollection objs;
|
||||||
lock (m_groupsWithTargets)
|
lock (m_groupsWithTargets)
|
||||||
{
|
objs = m_groupsWithTargets.Values;
|
||||||
foreach (SceneObjectGroup entry in m_groupsWithTargets.Values)
|
|
||||||
{
|
foreach (SceneObjectGroup entry in objs)
|
||||||
entry.checkAtTargets();
|
entry.checkAtTargets();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -4714,6 +4716,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteFromStorage(UUID uuid)
|
public void DeleteFromStorage(UUID uuid)
|
||||||
|
|
|
@ -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
|
||||||
|
@ -1291,13 +1291,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
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,49 +80,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
parts[i].Inventory.RemoveScriptInstances(sceneObjectBeingDeleted);
|
parts[i].Inventory.RemoveScriptInstances(sceneObjectBeingDeleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="remoteClient"></param>
|
|
||||||
/// <param name="localID"></param>
|
|
||||||
public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID)
|
|
||||||
{
|
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
return part.Inventory.GetInventoryFileName(remoteClient, localID);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[PRIM INVENTORY]: " +
|
|
||||||
"Couldn't find part {0} in object group {1}, {2} to retreive prim inventory",
|
|
||||||
localID, Name, UUID);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Return serialized inventory metadata for the given constituent prim
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="localID"></param>
|
|
||||||
/// <param name="xferManager"></param>
|
|
||||||
public void RequestInventoryFile(IClientAPI client, uint localID, IXfer xferManager)
|
|
||||||
{
|
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
part.Inventory.RequestInventoryFile(client, xferManager);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[PRIM INVENTORY]: " +
|
|
||||||
"Couldn't find part {0} in object group {1}, {2} to request inventory data",
|
|
||||||
localID, Name, UUID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an inventory item to a prim in this group.
|
/// Add an inventory item to a prim in this group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -3255,13 +3255,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)
|
||||||
|
|
|
@ -46,7 +46,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string m_inventoryFileName = String.Empty;
|
private string m_inventoryFileName = String.Empty;
|
||||||
private int m_inventoryFileNameSerial = 0;
|
private byte[] m_inventoryFileData = new byte[0];
|
||||||
|
private uint m_inventoryFileNameSerial = 0;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The part to which the inventory belongs.
|
/// The part to which the inventory belongs.
|
||||||
|
@ -765,58 +766,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetInventoryFileName()
|
private bool CreateInventoryFile()
|
||||||
{
|
{
|
||||||
if (m_inventoryFileName == String.Empty)
|
if (m_inventoryFileName == String.Empty ||
|
||||||
|
m_inventoryFileNameSerial < m_inventorySerial)
|
||||||
|
{
|
||||||
|
// Something changed, we need to create a new file
|
||||||
m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
|
m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
|
||||||
if (m_inventoryFileNameSerial < m_inventorySerial)
|
m_inventoryFileNameSerial = m_inventorySerial;
|
||||||
{
|
|
||||||
m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
|
|
||||||
}
|
|
||||||
return m_inventoryFileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Return the name with which a client can request a xfer of this prim's inventory metadata
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="localID"></param>
|
|
||||||
public bool GetInventoryFileName(IClientAPI client, uint localID)
|
|
||||||
{
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[PRIM INVENTORY]: Received request from client {0} for inventory file name of {1}, {2}",
|
|
||||||
// client.AgentId, Name, UUID);
|
|
||||||
|
|
||||||
if (m_inventorySerial > 0)
|
|
||||||
{
|
|
||||||
client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial,
|
|
||||||
Utils.StringToBytes(GetInventoryFileName()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="xferManager"></param>
|
|
||||||
public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
|
|
||||||
{
|
|
||||||
byte[] fileData = new byte[0];
|
|
||||||
|
|
||||||
// Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches
|
|
||||||
// what appears to happen in the Second Life protocol. If this isn't the case. then various functionality
|
|
||||||
// isn't available (such as drag from prim inventory to agent inventory)
|
|
||||||
InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero);
|
InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero);
|
||||||
|
|
||||||
bool includeAssets = false;
|
|
||||||
if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId))
|
|
||||||
includeAssets = true;
|
|
||||||
|
|
||||||
lock (m_items)
|
lock (m_items)
|
||||||
{
|
{
|
||||||
foreach (TaskInventoryItem item in m_items.Values)
|
foreach (TaskInventoryItem item in m_items.Values)
|
||||||
|
@ -847,10 +807,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
invString.AddNameValueLine("group_id", item.GroupID.ToString());
|
invString.AddNameValueLine("group_id", item.GroupID.ToString());
|
||||||
invString.AddSectionEnd();
|
invString.AddSectionEnd();
|
||||||
|
|
||||||
if (includeAssets)
|
|
||||||
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
|
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
|
||||||
else
|
|
||||||
invString.AddNameValueLine("asset_id", UUID.Zero.ToString());
|
|
||||||
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
|
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
|
||||||
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
|
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
|
||||||
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
|
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
|
||||||
|
@ -868,15 +825,43 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fileData = Utils.StringToBytes(invString.BuildString);
|
m_inventoryFileData = Utils.StringToBytes(invString.BuildString);
|
||||||
|
|
||||||
//m_log.Debug(Utils.BytesToString(fileData));
|
return true;
|
||||||
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
|
|
||||||
|
|
||||||
if (fileData.Length > 2)
|
|
||||||
{
|
|
||||||
xferManager.AddNewFile(m_inventoryFileName, fileData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No need to recreate, the existing file is fine
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="xferManager"></param>
|
||||||
|
public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
|
||||||
|
{
|
||||||
|
bool changed = CreateInventoryFile();
|
||||||
|
|
||||||
|
if (m_inventorySerial == 0) // No inventory
|
||||||
|
{
|
||||||
|
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In principle, we should only do the rest if the inventory changed;
|
||||||
|
// by sending m_inventorySerial to the client, it ought to know
|
||||||
|
// that nothing changed and that it doesn't need to request the file.
|
||||||
|
// Unfortunately, it doesn't look like the client optimizes this;
|
||||||
|
// the client seems to always come back and request the Xfer,
|
||||||
|
// no matter what value m_inventorySerial has.
|
||||||
|
|
||||||
|
if (m_inventoryFileData.Length > 2)
|
||||||
|
// Add the file for Xfer
|
||||||
|
xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData);
|
||||||
|
|
||||||
|
// Tell the client we're ready to Xfer the file
|
||||||
|
client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial,
|
||||||
|
Util.StringToBytes256(m_inventoryFileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1779,7 +1779,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);
|
||||||
|
@ -1883,11 +1884,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)
|
||||||
|
@ -2301,33 +2303,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2380,6 +2355,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#region Overridden Methods
|
#region Overridden Methods
|
||||||
|
|
||||||
|
private bool sendingPrims = false;
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
{
|
{
|
||||||
const float ROTATION_TOLERANCE = 0.01f;
|
const float ROTATION_TOLERANCE = 0.01f;
|
||||||
|
@ -2387,7 +2364,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
const float POSITION_TOLERANCE = 0.05f;
|
const float POSITION_TOLERANCE = 0.05f;
|
||||||
//const int TIME_MS_TOLERANCE = 3000;
|
//const int TIME_MS_TOLERANCE = 3000;
|
||||||
|
|
||||||
SendPrimUpdates();
|
if (!sendingPrims)
|
||||||
|
Util.FireAndForget(delegate { sendingPrims = true; SendPrimUpdates(); sendingPrims = false; });
|
||||||
|
|
||||||
if (m_isChildAgent == false)
|
if (m_isChildAgent == false)
|
||||||
{
|
{
|
||||||
|
@ -2415,6 +2393,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// followed suggestion from mic bowman. reversed the two lines below.
|
// followed suggestion from mic bowman. reversed the two lines below.
|
||||||
if (m_parentID == 0 && m_physicsActor != null || m_parentID != 0) // Check that we have a physics actor or we're sitting on something
|
if (m_parentID == 0 && m_physicsActor != null || m_parentID != 0) // Check that we have a physics actor or we're sitting on something
|
||||||
CheckForBorderCrossing();
|
CheckForBorderCrossing();
|
||||||
|
|
||||||
CheckForSignificantMovement(); // sends update to the modules.
|
CheckForSignificantMovement(); // sends update to the modules.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3327,8 +3306,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.95f seems to make walking feel less jerky,
|
||||||
|
// probably because it hackishly accounts for the overall latency of
|
||||||
|
// these Velocity updates -- Diva
|
||||||
|
Velocity = force * .95F;
|
||||||
|
|
||||||
m_forceToApply = null;
|
m_forceToApply = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1114,15 +1114,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
WriteVector(writer, "AngularVelocity", sop.AngularVelocity);
|
WriteVector(writer, "AngularVelocity", sop.AngularVelocity);
|
||||||
WriteVector(writer, "Acceleration", sop.Acceleration);
|
WriteVector(writer, "Acceleration", sop.Acceleration);
|
||||||
writer.WriteElementString("Description", sop.Description);
|
writer.WriteElementString("Description", sop.Description);
|
||||||
if (sop.Color != null)
|
|
||||||
{
|
|
||||||
writer.WriteStartElement("Color");
|
writer.WriteStartElement("Color");
|
||||||
writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture));
|
writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture));
|
||||||
writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture));
|
writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture));
|
||||||
writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture));
|
writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture));
|
||||||
writer.WriteElementString("A", sop.Color.G.ToString(Utils.EnUsCulture));
|
writer.WriteElementString("A", sop.Color.G.ToString(Utils.EnUsCulture));
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
}
|
|
||||||
|
|
||||||
writer.WriteElementString("Text", sop.Text);
|
writer.WriteElementString("Text", sop.Text);
|
||||||
writer.WriteElementString("SitName", sop.SitName);
|
writer.WriteElementString("SitName", sop.SitName);
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1125,6 +1125,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1689,5 +1694,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -25,34 +25,41 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
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>
|
/// <summary>
|
||||||
/// Interface for an object which can send texture information to a client
|
/// Basic groups module tests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ITextureSender
|
[TestFixture]
|
||||||
|
public class GroupsModuleTests
|
||||||
{
|
{
|
||||||
/// <summary>
|
[Test]
|
||||||
/// Are we in the process of sending the texture?
|
public void TestBasic()
|
||||||
/// </summary>
|
{
|
||||||
bool Sending { get; set; }
|
TestHelper.InMethod();
|
||||||
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
/// <summary>
|
TestScene scene = SceneSetupHelpers.SetupScene();
|
||||||
/// Has the texture send been cancelled?
|
IConfigSource configSource = new IniConfigSource();
|
||||||
/// </summary>
|
IConfig config = configSource.AddConfig("Groups");
|
||||||
bool Cancel { get; set; }
|
config.Set("Enabled", true);
|
||||||
|
config.Set("Module", "GroupsModule");
|
||||||
/// <summary>
|
config.Set("DebugEnabled", true);
|
||||||
/// Update the non data properties of a texture request
|
SceneSetupHelpers.SetupSceneModules(
|
||||||
/// </summary>
|
scene, configSource, new object[] { new MockGroupsServicesConnector() });
|
||||||
/// <param name="discardLevel"></param>
|
}
|
||||||
/// <param name="packetNumber"></param>
|
|
||||||
void UpdateRequest(int discardLevel, uint packetNumber);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send a texture packet to the client.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>True if the last packet has been sent, false otherwise.</returns>
|
|
||||||
bool SendTexturePacket();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,62 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("SvnSerialiser")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
|
||||||
[assembly: AssemblyProduct("SvnSerialiser")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (c) 2008")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("c0893655-0c18-4dd7-8b5b-5f58ab1ec6c7")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
|
||||||
[assembly: AssemblyVersion("0.6.5.*")]
|
|
||||||
[assembly: AssemblyFileVersion("0.6.5.0")]
|
|
|
@ -1,399 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Timers;
|
|
||||||
using log4net;
|
|
||||||
using Nini.Config;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
|
||||||
using OpenSim.Region.CoreModules.World.Terrain;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
|
||||||
using PumaCode.SvnDotNet.AprSharp;
|
|
||||||
using PumaCode.SvnDotNet.SubversionSharp;
|
|
||||||
using Slash = System.IO.Path;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Modules.SvnSerialiser
|
|
||||||
{
|
|
||||||
public class SvnBackupModule : IRegionModule
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private List<Scene> m_scenes;
|
|
||||||
private Timer m_timer;
|
|
||||||
private bool m_enabled;
|
|
||||||
private bool m_installBackupOnLoad;
|
|
||||||
private IRegionSerialiserModule m_serialiser;
|
|
||||||
private bool m_svnAutoSave;
|
|
||||||
private SvnClient m_svnClient;
|
|
||||||
private string m_svndir = "SVNmodule" + Slash.DirectorySeparatorChar + "repo";
|
|
||||||
private string m_svnpass = "password";
|
|
||||||
|
|
||||||
private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0);
|
|
||||||
private string m_svnurl = "svn://insert.Your.svn/here/";
|
|
||||||
private string m_svnuser = "username";
|
|
||||||
|
|
||||||
#region SvnModule Core
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Exports a specified scene to the SVN repo directory, then commits.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="scene">The scene to export</param>
|
|
||||||
public void SaveRegion(Scene scene)
|
|
||||||
{
|
|
||||||
List<string> svnfilenames = CreateAndAddExport(scene);
|
|
||||||
|
|
||||||
m_svnClient.Commit3(svnfilenames, true, false);
|
|
||||||
m_log.Info("[SVNBACKUP]: Region backup successful (" + scene.RegionInfo.RegionName + ").");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Saves all registered scenes to the SVN repo, then commits.
|
|
||||||
/// </summary>
|
|
||||||
public void SaveAllRegions()
|
|
||||||
{
|
|
||||||
List<string> svnfilenames = new List<string>();
|
|
||||||
List<string> regions = new List<string>();
|
|
||||||
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
svnfilenames.AddRange(CreateAndAddExport(scene));
|
|
||||||
regions.Add("'" + scene.RegionInfo.RegionName + "' ");
|
|
||||||
}
|
|
||||||
|
|
||||||
m_svnClient.Commit3(svnfilenames, true, false);
|
|
||||||
m_log.Info("[SVNBACKUP]: Server backup successful (" + String.Concat(regions.ToArray()) + ").");
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<string> CreateAndAddExport(Scene scene)
|
|
||||||
{
|
|
||||||
m_log.Info("[SVNBACKUP]: Saving a region to SVN with name " + scene.RegionInfo.RegionName);
|
|
||||||
|
|
||||||
List<string> filenames = m_serialiser.SerialiseRegion(scene, m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
m_svnClient.Add3(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID, true, false, false);
|
|
||||||
}
|
|
||||||
catch (SvnException)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> svnfilenames = new List<string>();
|
|
||||||
foreach (string filename in filenames)
|
|
||||||
svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + filename);
|
|
||||||
svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID);
|
|
||||||
|
|
||||||
return svnfilenames;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadRegion(Scene scene)
|
|
||||||
{
|
|
||||||
IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
|
|
||||||
if (serialiser != null)
|
|
||||||
{
|
|
||||||
serialiser.LoadPrimsFromXml2(
|
|
||||||
scene,
|
|
||||||
m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID
|
|
||||||
+ Slash.DirectorySeparatorChar + "objects.xml");
|
|
||||||
|
|
||||||
scene.RequestModuleInterface<ITerrainModule>().LoadFromFile(
|
|
||||||
m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID
|
|
||||||
+ Slash.DirectorySeparatorChar + "heightmap.r32");
|
|
||||||
|
|
||||||
m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ").");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[SVNBACKUP]: Region load of {0} failed - no serialisation module available",
|
|
||||||
scene.RegionInfo.RegionName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckoutSvn()
|
|
||||||
{
|
|
||||||
m_svnClient.Checkout2(m_svnurl, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckoutSvn(SvnRevision revision)
|
|
||||||
{
|
|
||||||
m_svnClient.Checkout2(m_svnurl, m_svndir, revision, revision, true, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// private void CheckoutSvnPartial(string subdir)
|
|
||||||
// {
|
|
||||||
// if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir))
|
|
||||||
// Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir);
|
|
||||||
|
|
||||||
// m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private void CheckoutSvnPartial(string subdir, SvnRevision revision)
|
|
||||||
// {
|
|
||||||
// if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir))
|
|
||||||
// Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir);
|
|
||||||
|
|
||||||
// m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SvnDotNet Callbacks
|
|
||||||
|
|
||||||
private SvnError SimpleAuth(out SvnAuthCredSimple svnCredentials, IntPtr baton,
|
|
||||||
AprString realm, AprString username, bool maySave, AprPool pool)
|
|
||||||
{
|
|
||||||
svnCredentials = SvnAuthCredSimple.Alloc(pool);
|
|
||||||
svnCredentials.Username = new AprString(m_svnuser, pool);
|
|
||||||
svnCredentials.Password = new AprString(m_svnpass, pool);
|
|
||||||
svnCredentials.MaySave = false;
|
|
||||||
return SvnError.NoError;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SvnError GetCommitLogCallback(out AprString logMessage, out SvnPath tmpFile, AprArray commitItems, IntPtr baton, AprPool pool)
|
|
||||||
{
|
|
||||||
if (!commitItems.IsNull)
|
|
||||||
{
|
|
||||||
foreach (SvnClientCommitItem2 item in commitItems)
|
|
||||||
{
|
|
||||||
m_log.Debug("[SVNBACKUP]: ... " + Path.GetFileName(item.Path.ToString()) + " (" + item.Kind.ToString() + ") r" + item.Revision.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string msg = "Region Backup (" + System.Environment.MachineName + " at " + DateTime.UtcNow + " UTC)";
|
|
||||||
|
|
||||||
m_log.Debug("[SVNBACKUP]: Saved with message: " + msg);
|
|
||||||
|
|
||||||
logMessage = new AprString(msg, pool);
|
|
||||||
tmpFile = new SvnPath(pool);
|
|
||||||
|
|
||||||
return (SvnError.NoError);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IRegionModule Members
|
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
|
||||||
{
|
|
||||||
m_scenes = new List<Scene>();
|
|
||||||
m_timer = new Timer();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!source.Configs["SVN"].GetBoolean("Enabled", false))
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_enabled = true;
|
|
||||||
|
|
||||||
m_svndir = source.Configs["SVN"].GetString("Directory", m_svndir);
|
|
||||||
m_svnurl = source.Configs["SVN"].GetString("URL", m_svnurl);
|
|
||||||
m_svnuser = source.Configs["SVN"].GetString("Username", m_svnuser);
|
|
||||||
m_svnpass = source.Configs["SVN"].GetString("Password", m_svnpass);
|
|
||||||
m_installBackupOnLoad = source.Configs["SVN"].GetBoolean("ImportOnStartup", m_installBackupOnLoad);
|
|
||||||
m_svnAutoSave = source.Configs["SVN"].GetBoolean("Autosave", m_svnAutoSave);
|
|
||||||
m_svnperiod = new TimeSpan(0, source.Configs["SVN"].GetInt("AutosavePeriod", (int) m_svnperiod.TotalMinutes), 0);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (m_scenes)
|
|
||||||
{
|
|
||||||
m_scenes.Add(scene);
|
|
||||||
}
|
|
||||||
//Only register it once, to prevent command being executed x*region times
|
|
||||||
if (m_scenes.Count == 1)
|
|
||||||
{
|
|
||||||
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
|
||||||
if (m_enabled == false)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (m_svnAutoSave)
|
|
||||||
{
|
|
||||||
m_timer.Interval = m_svnperiod.TotalMilliseconds;
|
|
||||||
m_timer.Elapsed += m_timer_Elapsed;
|
|
||||||
m_timer.AutoReset = true;
|
|
||||||
m_timer.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_log.Info("[SVNBACKUP]: Connecting to SVN server " + m_svnurl + " ...");
|
|
||||||
SetupSvnProvider();
|
|
||||||
|
|
||||||
m_log.Info("[SVNBACKUP]: Creating repository in " + m_svndir + ".");
|
|
||||||
CreateSvnDirectory();
|
|
||||||
CheckoutSvn();
|
|
||||||
SetupSerialiser();
|
|
||||||
|
|
||||||
if (m_installBackupOnLoad)
|
|
||||||
{
|
|
||||||
m_log.Info("[SVNBACKUP]: Importing latest SVN revision to scenes...");
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
LoadRegion(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get { return "SvnBackupModule"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void EventManager_OnPluginConsole(string[] args)
|
|
||||||
{
|
|
||||||
if (args[0] == "svn" && args[1] == "save")
|
|
||||||
{
|
|
||||||
SaveAllRegions();
|
|
||||||
}
|
|
||||||
if (args.Length == 2)
|
|
||||||
{
|
|
||||||
if (args[0] == "svn" && args[1] == "load")
|
|
||||||
{
|
|
||||||
LoadAllScenes();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (args.Length == 3)
|
|
||||||
{
|
|
||||||
if (args[0] == "svn" && args[1] == "load")
|
|
||||||
{
|
|
||||||
LoadAllScenes(Int32.Parse(args[2]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (args.Length == 3)
|
|
||||||
{
|
|
||||||
if (args[0] == "svn" && args[1] == "load-region")
|
|
||||||
{
|
|
||||||
LoadScene(args[2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (args.Length == 4)
|
|
||||||
{
|
|
||||||
if (args[0] == "svn" && args[1] == "load-region")
|
|
||||||
{
|
|
||||||
LoadScene(args[2], Int32.Parse(args[3]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadScene(string name)
|
|
||||||
{
|
|
||||||
CheckoutSvn();
|
|
||||||
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower()))
|
|
||||||
{
|
|
||||||
LoadRegion(scene);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name.");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadScene(string name, int revision)
|
|
||||||
{
|
|
||||||
CheckoutSvn(new SvnRevision(revision));
|
|
||||||
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower()))
|
|
||||||
{
|
|
||||||
LoadRegion(scene);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name.");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadAllScenes()
|
|
||||||
{
|
|
||||||
CheckoutSvn();
|
|
||||||
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
LoadRegion(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadAllScenes(int revision)
|
|
||||||
{
|
|
||||||
CheckoutSvn(new SvnRevision(revision));
|
|
||||||
|
|
||||||
foreach (Scene scene in m_scenes)
|
|
||||||
{
|
|
||||||
LoadRegion(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void m_timer_Elapsed(object sender, ElapsedEventArgs e)
|
|
||||||
{
|
|
||||||
SaveAllRegions();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupSerialiser()
|
|
||||||
{
|
|
||||||
if (m_scenes.Count > 0)
|
|
||||||
m_serialiser = m_scenes[0].RequestModuleInterface<IRegionSerialiserModule>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupSvnProvider()
|
|
||||||
{
|
|
||||||
m_svnClient = new SvnClient();
|
|
||||||
m_svnClient.AddUsernameProvider();
|
|
||||||
m_svnClient.AddPromptProvider(new SvnAuthProviderObject.SimplePrompt(SimpleAuth), IntPtr.Zero, 2);
|
|
||||||
m_svnClient.OpenAuth();
|
|
||||||
m_svnClient.Context.LogMsgFunc2 = new SvnDelegate(new SvnClient.GetCommitLog2(GetCommitLogCallback));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CreateSvnDirectory()
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(m_svndir))
|
|
||||||
Directory.CreateDirectory(m_svndir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -691,6 +691,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
|
|
||||||
public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
|
public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
public virtual void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
||||||
|
@ -1171,5 +1175,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -1126,6 +1126,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
_position.Y = vec.Y;
|
_position.Y = vec.Y;
|
||||||
_position.Z = vec.Z;
|
_position.Z = vec.Z;
|
||||||
|
|
||||||
|
// I think we need to update the taintPosition too -- Diva 12/24/10
|
||||||
|
m_taintPosition.X = vec.X;
|
||||||
|
m_taintPosition.Y = vec.Y;
|
||||||
|
m_taintPosition.Z = vec.Z;
|
||||||
|
|
||||||
// Did we move last? = zeroflag
|
// Did we move last? = zeroflag
|
||||||
// This helps keep us from sliding all over
|
// This helps keep us from sliding all over
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
private OdePrim cp1;
|
private OdePrim cp1;
|
||||||
private OdeCharacter cc2;
|
private OdeCharacter cc2;
|
||||||
private OdePrim cp2;
|
private OdePrim cp2;
|
||||||
|
private int tickCountFrameRun;
|
||||||
|
|
||||||
|
private int latertickcount=0;
|
||||||
//private int cStartStop = 0;
|
//private int cStartStop = 0;
|
||||||
//private string cDictKey = "";
|
//private string cDictKey = "";
|
||||||
|
|
||||||
|
@ -3123,6 +3126,22 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
|
d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
|
||||||
}
|
}
|
||||||
|
latertickcount = Util.EnvironmentTickCount() - tickCountFrameRun;
|
||||||
|
|
||||||
|
// OpenSimulator above does 10 fps. 10 fps = means that the main thread loop and physics
|
||||||
|
// has a max of 100 ms to run theoretically.
|
||||||
|
// If the main loop stalls, it calls Simulate later which makes the tick count ms larger.
|
||||||
|
// If Physics stalls, it takes longer which makes the tick count ms larger.
|
||||||
|
|
||||||
|
if (latertickcount < 100)
|
||||||
|
m_timeDilation = 1.0f;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timeDilation = 100f / latertickcount;
|
||||||
|
//m_timeDilation = Math.Min((Math.Max(100 - (Util.EnvironmentTickCount() - tickCountFrameRun), 1) / 100f), 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
tickCountFrameRun = Util.EnvironmentTickCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fps;
|
return fps;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -6372,16 +6372,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))
|
||||||
|
{
|
||||||
|
if (land.LandData.ParcelAccessList.FindIndex(
|
||||||
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
|
{
|
||||||
|
if (e.AgentID == key && e.Flags == AccessList.Access)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}) == -1)
|
||||||
{
|
{
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = AccessList.Access;
|
entry.Flags = AccessList.Access;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
entry.Time = DateTime.Now.AddHours(hours);
|
||||||
land.ParcelAccessList.Add(entry);
|
land.LandData.ParcelAccessList.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9110,7 +9119,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;
|
||||||
|
@ -9553,16 +9562,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))
|
||||||
|
{
|
||||||
|
if (land.LandData.ParcelAccessList.FindIndex(
|
||||||
|
delegate(ParcelManager.ParcelAccessEntry e)
|
||||||
|
{
|
||||||
|
if (e.AgentID == key && e.Flags == AccessList.Ban)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}) == -1)
|
||||||
{
|
{
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = AccessList.Ban;
|
entry.Flags = AccessList.Ban;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
entry.Time = DateTime.Now.AddHours(hours);
|
||||||
land.ParcelAccessList.Add(entry);
|
land.LandData.ParcelAccessList.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9572,19 +9590,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)
|
||||||
{
|
return true;
|
||||||
land.ParcelAccessList.Remove(entry);
|
return false;
|
||||||
break;
|
});
|
||||||
}
|
|
||||||
}
|
if (idx != -1)
|
||||||
|
land.LandData.ParcelAccessList.RemoveAt(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptSleep(100);
|
ScriptSleep(100);
|
||||||
|
@ -9594,19 +9614,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)
|
||||||
{
|
return true;
|
||||||
land.ParcelAccessList.Remove(entry);
|
return false;
|
||||||
break;
|
});
|
||||||
}
|
|
||||||
}
|
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];
|
||||||
}
|
}
|
||||||
|
@ -675,21 +698,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
== World.LandChannel.GetLandObject(
|
== World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
// Check for hostname , attempt to make a hglink
|
// Check for hostname, attempt to make a HG link,
|
||||||
// and convert the regionName to the target region
|
// and convert the regionName to the target region
|
||||||
if (regionName.Contains(".") && regionName.Contains(":"))
|
if (regionName.Contains(".") && regionName.Contains(":"))
|
||||||
{
|
{
|
||||||
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
|
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
|
||||||
// Try to link the region
|
string[] parts = regionName.Split(new char[] { ':' });
|
||||||
if (regions != null && regions.Count > 0)
|
|
||||||
{
|
|
||||||
GridRegion regInfo = regions[0];
|
|
||||||
string[] parts = regInfo.RegionName.Split(new char[] { ':' });
|
|
||||||
if (parts.Length > 2)
|
if (parts.Length > 2)
|
||||||
regionName = parts[2];
|
regionName = parts[0] + ':' + parts[1] + "/ " + parts[2];
|
||||||
else
|
regionName = "http://" + regionName;
|
||||||
regionName = parts[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
||||||
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
||||||
|
@ -1001,9 +1018,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 +1039,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 +1184,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 +1210,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 +1245,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 +1261,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 +1304,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 +1329,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 +1355,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);
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
|
||||||
public virtual string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs();
|
Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs();
|
||||||
Dictionary<string, object> sendData = new Dictionary<string,object>();
|
Dictionary<string, object> sendData = new Dictionary<string,object>();
|
||||||
|
@ -140,7 +140,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return "Error communicating with grid service";
|
return "Error communicating with grid service";
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool DeregisterRegion(UUID regionID)
|
public bool DeregisterRegion(UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual GridRegion GetRegionByName(UUID scopeID, string regionName)
|
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
|
public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int GetRegionFlags(UUID scopeID, UUID regionID)
|
public int GetRegionFlags(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
|
public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
|
||||||
{
|
{
|
||||||
string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/";
|
string uri = region.ServerURI + "region/" + thisRegion.RegionID + "/";
|
||||||
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
|
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
|
||||||
|
|
||||||
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
|
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
|
||||||
|
|
|
@ -51,50 +51,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// Connects region registration and neighbor lookups to the SimianGrid
|
/// Connects region registration and neighbor lookups to the SimianGrid
|
||||||
/// backend
|
/// backend
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
public class SimianGridServiceConnector : IGridService
|
||||||
public class SimianGridServiceConnector : IGridService, ISharedRegionModule
|
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_ServerURI = String.Empty;
|
||||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
|
||||||
private bool m_Enabled = false;
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
|
||||||
|
|
||||||
public Type ReplaceableInterface { get { return null; } }
|
|
||||||
public void RegionLoaded(Scene scene) { }
|
|
||||||
public void PostInitialise() { }
|
|
||||||
public void Close() { }
|
|
||||||
|
|
||||||
public SimianGridServiceConnector() { }
|
public SimianGridServiceConnector() { }
|
||||||
public string Name { get { return "SimianGridServiceConnector"; } }
|
public SimianGridServiceConnector(string serverURI)
|
||||||
public void AddRegion(Scene scene)
|
|
||||||
{
|
{
|
||||||
if (!m_Enabled)
|
m_ServerURI = serverURI.TrimEnd('/');
|
||||||
return;
|
|
||||||
|
|
||||||
// Every shared region module has to maintain an indepedent list of
|
|
||||||
// currently running regions
|
|
||||||
lock (m_scenes)
|
|
||||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
}
|
||||||
public void RemoveRegion(Scene scene)
|
|
||||||
{
|
|
||||||
if (!m_Enabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lock (m_scenes)
|
|
||||||
m_scenes.Remove(scene.RegionInfo.RegionID);
|
|
||||||
|
|
||||||
scene.UnregisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
|
||||||
|
|
||||||
public SimianGridServiceConnector(IConfigSource source)
|
public SimianGridServiceConnector(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
@ -103,32 +73,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["Modules"];
|
|
||||||
if (moduleConfig != null)
|
|
||||||
{
|
|
||||||
string name = moduleConfig.GetString("GridServices", "");
|
|
||||||
if (name == Name)
|
|
||||||
CommonInit(source);
|
CommonInit(source);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void CommonInit(IConfigSource source)
|
private void CommonInit(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["GridService"];
|
IConfig gridConfig = source.Configs["GridService"];
|
||||||
if (gridConfig != null)
|
if (gridConfig == null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("GridServerURI");
|
m_log.Error("[SIMIAN GRID CONNECTOR]: GridService missing from OpenSim.ini");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
throw new Exception("Grid connector init error");
|
||||||
{
|
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
|
||||||
serviceUrl = serviceUrl + '/';
|
|
||||||
m_serverUrl = serviceUrl;
|
|
||||||
m_Enabled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
string serviceUrl = gridConfig.GetString("GridServerURI");
|
||||||
m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector");
|
if (String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService");
|
||||||
|
throw new Exception("Grid connector init error");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_ServerURI = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
@ -136,11 +103,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
||||||
{
|
{
|
||||||
// Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
|
// Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
|
||||||
Scene scene;
|
// Scene scene;
|
||||||
if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
|
// if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
|
||||||
UploadMapTile(scene);
|
// UploadMapTile(scene);
|
||||||
else
|
// else
|
||||||
m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
|
// m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
|
||||||
|
|
||||||
Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
|
Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
|
||||||
Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
|
Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
|
||||||
|
@ -171,7 +138,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "ExtraData", OSDParser.SerializeJsonString(extraData) }
|
{ "ExtraData", OSDParser.SerializeJsonString(extraData) }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
else
|
else
|
||||||
|
@ -187,7 +154,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "0" }
|
{ "Enabled", "0" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
bool success = response["Success"].AsBoolean();
|
bool success = response["Success"].AsBoolean();
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
|
@ -232,9 +199,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "SceneID", regionID.ToString() }
|
{ "SceneID", regionID.ToString() }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region with uuid {0}",regionID.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] uuid request successful {0}",response["Name"].AsString());
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -257,14 +227,17 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "1" }
|
{ "Enabled", "1" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] position request successful {0}",response["Name"].AsString());
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}",
|
// m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}",
|
||||||
// x / Constants.RegionSize, y / Constants.RegionSize);
|
// x / Constants.RegionSize, y / Constants.RegionSize);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -295,9 +268,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
if (maxNumber > 0)
|
if (maxNumber > 0)
|
||||||
requestArgs["MaxNumber"] = maxNumber.ToString();
|
requestArgs["MaxNumber"] = maxNumber.ToString();
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions with name {0}",name);
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name);
|
||||||
|
|
||||||
OSDArray array = response["Scenes"] as OSDArray;
|
OSDArray array = response["Scenes"] as OSDArray;
|
||||||
if (array != null)
|
if (array != null)
|
||||||
{
|
{
|
||||||
|
@ -328,7 +305,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "1" }
|
{ "Enabled", "1" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
m_log.WarnFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
OSDArray array = response["Scenes"] as OSDArray;
|
OSDArray array = response["Scenes"] as OSDArray;
|
||||||
|
@ -384,7 +364,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "SceneID", regionID.ToString() }
|
{ "SceneID", regionID.ToString() }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0;
|
return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0;
|
||||||
|
@ -430,7 +412,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
// Make the remote storage request
|
// Make the remote storage request
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
|
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
|
||||||
|
|
||||||
HttpWebResponse response = MultipartForm.Post(request, postParameters);
|
HttpWebResponse response = MultipartForm.Post(request, postParameters);
|
||||||
using (Stream responseStream = response.GetResponseStream())
|
using (Stream responseStream = response.GetResponseStream())
|
||||||
|
@ -486,7 +468,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
if (onlyEnabled)
|
if (onlyEnabled)
|
||||||
requestArgs["Enabled"] = "1";
|
requestArgs["Enabled"] = "1";
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
|
|
|
@ -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,16 +121,31 @@ 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)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
||||||
"link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]",
|
"link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]",
|
||||||
"Link a HyperGrid Region", RunCommand);
|
"Link a HyperGrid Region. Examples for <ServerURI>: http://grid.net:8002/ or http://example.org/path/foo.php", RunCommand);
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
||||||
"link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
|
"link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
|
||||||
"Link a hypergrid region (deprecated)", RunCommand);
|
"Link a hypergrid region (deprecated)", RunCommand);
|
||||||
|
@ -244,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;
|
||||||
}
|
}
|
||||||
|
@ -268,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))
|
||||||
{
|
{
|
||||||
|
@ -312,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,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;
|
||||||
}
|
}
|
||||||
|
@ -461,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)
|
||||||
|
@ -489,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)
|
||||||
{
|
{
|
||||||
|
@ -516,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
|
||||||
{
|
{
|
||||||
|
@ -558,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]);
|
||||||
}
|
}
|
||||||
|
@ -584,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);
|
{
|
||||||
|
region = m_GridService.GetRegionByName(m_ScopeID, regionName);
|
||||||
if (region == null)
|
if (region == null)
|
||||||
{
|
{
|
||||||
reason = "Region not found";
|
reason = "Region not found";
|
||||||
return false;
|
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;
|
||||||
|
@ -333,10 +330,12 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (parts.Length < 2)
|
if (parts.Length < 2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
string addressee = parts[0];
|
char[] trailing_slash = new char[] { '/' };
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName);
|
string addressee = parts[0].TrimEnd(trailing_slash);
|
||||||
|
string externalname = m_ExternalName.TrimEnd(trailing_slash);
|
||||||
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
|
||||||
|
|
||||||
return string.Equals(addressee, m_ExternalName, StringComparison.OrdinalIgnoreCase);
|
return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -704,6 +704,11 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void SendAbortXferPacket(ulong xferID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
|
||||||
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
|
||||||
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
|
||||||
|
@ -1228,5 +1233,9 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
public void StopFlying(ISceneEntity presence)
|
public void StopFlying(ISceneEntity presence)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,201 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
|
@ -1,28 +0,0 @@
|
||||||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
|
||||||
1. Definitions
|
|
||||||
|
|
||||||
The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the same meaning here as under U.S. copyright law.
|
|
||||||
|
|
||||||
A “contribution” is the original software, or any additions or changes to the software.
|
|
||||||
|
|
||||||
A “contributor” is any person that distributes its contribution under this license.
|
|
||||||
|
|
||||||
“Licensed patents” are a contributor’s patent claims that read directly on its contribution.
|
|
||||||
2. Grant of Rights
|
|
||||||
|
|
||||||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
|
||||||
|
|
||||||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
|
||||||
3. Conditions and Limitations
|
|
||||||
|
|
||||||
(A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks.
|
|
||||||
|
|
||||||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
|
||||||
|
|
||||||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
|
||||||
|
|
||||||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
|
||||||
|
|
||||||
(E) The software is licensed “as-is.” You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
|
||||||
|
|
||||||
See FAQ.html for answers to frequently asked questions about this license.
|
|
|
@ -1,497 +0,0 @@
|
||||||
The SvnDotNet libraries are Copyright (c) 2007 by PumaCode.org and
|
|
||||||
released under the GNU Library General Public License (LGPL)
|
|
||||||
version 2.1 as stated below.
|
|
||||||
http://www.pumacode.org/projects/svndotnet
|
|
||||||
|
|
||||||
By committing code or submitting patches to this project or its mailing
|
|
||||||
list, you agree that you hold the copyright to such code unless
|
|
||||||
explicitly noted otherwise, and you agree to donate your copyright
|
|
||||||
of such code to PumaCode.org for the purposes of releasing it under the
|
|
||||||
LGPL.
|
|
||||||
|
|
||||||
Portions of this code, specifically the majority of the AprSharp and
|
|
||||||
SubversionSharp namespaces, are Copyright (c) 2004 SOFTEC sa. and are
|
|
||||||
also released under the LGPL.
|
|
||||||
http://www.softec.st/index.html
|
|
||||||
|
|
||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the library GPL. It is
|
|
||||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Library General Public License, applies to some
|
|
||||||
specially designated Free Software Foundation software, and to any
|
|
||||||
other libraries whose authors decide to use it. You can use it for
|
|
||||||
your libraries, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if
|
|
||||||
you distribute copies of the library, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link a program with the library, you must provide
|
|
||||||
complete object files to the recipients so that they can relink them
|
|
||||||
with the library, after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
Our method of protecting your rights has two steps: (1) copyright
|
|
||||||
the library, and (2) offer you this license which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
Also, for each distributor's protection, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
library. If the library is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original
|
|
||||||
version, so that any problems introduced by others will not reflect on
|
|
||||||
the original authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that companies distributing free
|
|
||||||
software will individually obtain patent licenses, thus in effect
|
|
||||||
transforming the program into proprietary software. To prevent this,
|
|
||||||
we have made it clear that any patent must be licensed for everyone's
|
|
||||||
free use or not licensed at all.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the ordinary
|
|
||||||
GNU General Public License, which was designed for utility programs. This
|
|
||||||
license, the GNU Library General Public License, applies to certain
|
|
||||||
designated libraries. This license is quite different from the ordinary
|
|
||||||
one; be sure to read it in full, and don't assume that anything in it is
|
|
||||||
the same as in the ordinary license.
|
|
||||||
|
|
||||||
The reason we have a separate public license for some libraries is that
|
|
||||||
they blur the distinction we usually make between modifying or adding to a
|
|
||||||
program and simply using it. Linking a program with a library, without
|
|
||||||
changing the library, is in some sense simply using the library, and is
|
|
||||||
analogous to running a utility program or application program. However, in
|
|
||||||
a textual and legal sense, the linked executable is a combined work, a
|
|
||||||
derivative of the original library, and the ordinary General Public License
|
|
||||||
treats it as such.
|
|
||||||
|
|
||||||
Because of this blurred distinction, using the ordinary General
|
|
||||||
Public License for libraries did not effectively promote software
|
|
||||||
sharing, because most developers did not use the libraries. We
|
|
||||||
concluded that weaker conditions might promote sharing better.
|
|
||||||
|
|
||||||
However, unrestricted linking of non-free programs would deprive the
|
|
||||||
users of those programs of all benefit from the free status of the
|
|
||||||
libraries themselves. This Library General Public License is intended to
|
|
||||||
permit developers of non-free programs to use free libraries, while
|
|
||||||
preserving your freedom as a user of such programs to change the free
|
|
||||||
libraries that are incorporated in them. (We have not seen how to achieve
|
|
||||||
this as regards changes in header files, but we have achieved it as regards
|
|
||||||
changes in the actual functions of the Library.) The hope is that this
|
|
||||||
will lead to faster development of free libraries.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, while the latter only
|
|
||||||
works together with the library.
|
|
||||||
|
|
||||||
Note that it is possible for a library to be covered by the ordinary
|
|
||||||
General Public License rather than by this special one.
|
|
||||||
|
|
||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library which
|
|
||||||
contains a notice placed by the copyright holder or other authorized
|
|
||||||
party saying it may be distributed under the terms of this Library
|
|
||||||
General Public License (also called "this License"). Each licensee is
|
|
||||||
addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also compile or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
c) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
d) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the source code distributed need not include anything that is normally
|
|
||||||
distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Library General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this library; if not, write to the Free
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
BIN
bin/AprSharp.dll
BIN
bin/AprSharp.dll
Binary file not shown.
BIN
bin/AprSharp.pdb
BIN
bin/AprSharp.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -622,16 +622,21 @@
|
||||||
;; or from the SimianGrid project at http://code.google.com/p/openmetaverse
|
;; or from the SimianGrid project at http://code.google.com/p/openmetaverse
|
||||||
; Module = Default
|
; Module = Default
|
||||||
|
|
||||||
|
;# {MessagingEnabled} {Module:GroupsModule} {Is groups messaging enabled?} {true false} true
|
||||||
|
; MessagingEnabled = true
|
||||||
|
|
||||||
;; Service connectors to the Groups Service. Select one depending on
|
;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule} GroupsMessagingModule
|
||||||
|
; MessagingModule = GroupsMessagingModule
|
||||||
|
|
||||||
|
;# {ServicesConnectorModule} {Module:GroupsModule} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector} XmlRpcGroupsServicesConnector
|
||||||
|
;; Service connectors to the Groups Service as used in the GroupsModule. Select one depending on
|
||||||
;; whether you're using a Flotsam XmlRpc backend or a SimianGrid backend
|
;; whether you're using a Flotsam XmlRpc backend or a SimianGrid backend
|
||||||
|
|
||||||
;# {ServicesConnectorModule} {Module:GroupsModule} {Service connector to use for groups?} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector} XmlRpcGroupsServicesConnector
|
|
||||||
;; The service connector to use for the GroupsModule
|
|
||||||
; ServicesConnectorModule = SimianGroupsServicesConnector
|
; ServicesConnectorModule = SimianGroupsServicesConnector
|
||||||
|
|
||||||
;# {GroupsServerURI} {Module:GroupsModule} {Groups Server URI?} {}
|
;# {GroupsServerURI} {Module:GroupsModule} {Groups Server URI} {}
|
||||||
;; URI for the groups services
|
;; URI for the groups services
|
||||||
|
;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc
|
||||||
|
;; or http://mygridserver.com:82/Grid/ for SimianGrid
|
||||||
; GroupsServerURI = ""
|
; GroupsServerURI = ""
|
||||||
|
|
||||||
;# {NoticesEnabled} {Module:GroupsModule} {Enable group notices?} {true false} true
|
;# {NoticesEnabled} {Module:GroupsModule} {Enable group notices?} {true false} true
|
||||||
|
@ -641,13 +646,8 @@
|
||||||
;; This makes the Groups modules very chatty on the console.
|
;; This makes the Groups modules very chatty on the console.
|
||||||
; DebugEnabled = false
|
; DebugEnabled = false
|
||||||
|
|
||||||
;; Specify which messaging module to use for groups messaging and if it's
|
|
||||||
;; enabled
|
|
||||||
; MessagingModule = GroupsMessagingModule
|
|
||||||
; MessagingEnabled = true
|
|
||||||
|
|
||||||
;; XmlRpc Security settings. These must match those set on your backend
|
;; XmlRpc Security settings. These must match those set on your backend
|
||||||
;; groups service.
|
;; groups service if the service is using these keys
|
||||||
; XmlRpcServiceReadKey = 1234
|
; XmlRpcServiceReadKey = 1234
|
||||||
; XmlRpcServiceWriteKey = 1234
|
; XmlRpcServiceWriteKey = 1234
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -908,17 +906,6 @@
|
||||||
PriceParcelRent = 1
|
PriceParcelRent = 1
|
||||||
|
|
||||||
|
|
||||||
[SVN]
|
|
||||||
Enabled = false
|
|
||||||
Directory = SVNmodule\repo
|
|
||||||
URL = "svn://your.repo.here/"
|
|
||||||
Username = "user"
|
|
||||||
Password = "password"
|
|
||||||
ImportOnStartup = false
|
|
||||||
Autosave = false
|
|
||||||
AutoSavePeriod = 15 ; Number of minutes between autosave backups
|
|
||||||
|
|
||||||
|
|
||||||
[XEngine]
|
[XEngine]
|
||||||
; Enable this engine in this OpenSim instance
|
; Enable this engine in this OpenSim instance
|
||||||
Enabled = true
|
Enabled = true
|
||||||
|
@ -1117,10 +1104,12 @@
|
||||||
; May represent a security risk if you disable this.
|
; May represent a security risk if you disable this.
|
||||||
OwnerOnly = true
|
OwnerOnly = true
|
||||||
|
|
||||||
|
|
||||||
[Hypergrid]
|
[Hypergrid]
|
||||||
; Keep it false for now. Making it true requires the use of a special client in order to access inventory
|
; Keep it false for now. Making it true requires the use of a special client in order to access inventory
|
||||||
safemode = false
|
safemode = false
|
||||||
|
|
||||||
|
|
||||||
[VivoxVoice]
|
[VivoxVoice]
|
||||||
; The VivoxVoice module will allow you to provide voice on your
|
; The VivoxVoice module will allow you to provide voice on your
|
||||||
; region(s). It uses the same voice technology as the LL grid and
|
; region(s). It uses the same voice technology as the LL grid and
|
||||||
|
@ -1179,6 +1168,7 @@
|
||||||
; - a value between 0 and 160, default is 10
|
; - a value between 0 and 160, default is 10
|
||||||
;vivox_channel_clamping_distance = 10
|
;vivox_channel_clamping_distance = 10
|
||||||
|
|
||||||
|
|
||||||
[Groups]
|
[Groups]
|
||||||
Enabled = false
|
Enabled = false
|
||||||
|
|
||||||
|
@ -1210,7 +1200,7 @@
|
||||||
;ServicesConnectorModule = XmlRpcGroupsServicesConnector
|
;ServicesConnectorModule = XmlRpcGroupsServicesConnector
|
||||||
;GroupsServerURI = http://yourxmlrpcserver.com/xmlrpc.php
|
;GroupsServerURI = http://yourxmlrpcserver.com/xmlrpc.php
|
||||||
|
|
||||||
; XmlRpc Security settings. These must match those set on your backend groups service.
|
; XmlRpc Security settings. These must match those set on your backend groups service if the service is using these keys
|
||||||
;XmlRpcServiceReadKey = 1234
|
;XmlRpcServiceReadKey = 1234
|
||||||
;XmlRpcServiceWriteKey = 1234
|
;XmlRpcServiceWriteKey = 1234
|
||||||
|
|
||||||
|
@ -1270,4 +1260,3 @@
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
Include-modules = "addon-modules/*/config/*.ini"
|
Include-modules = "addon-modules/*/config/*.ini"
|
||||||
|
|
||||||
|
|
|
@ -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>"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -38,6 +38,8 @@
|
||||||
; for the LocalGridServicesConnector which is used by the Remote one
|
; for the LocalGridServicesConnector which is used by the Remote one
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector"
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
||||||
LibraryName = "OpenSim Library"
|
LibraryName = "OpenSim Library"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -49,6 +49,11 @@
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector"
|
||||||
|
|
||||||
|
; Needed to display non-default map tile images for linked regions
|
||||||
|
AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector"
|
||||||
|
|
||||||
AllowHypergridMapSearch = true
|
AllowHypergridMapSearch = true
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
Include-Common = "config-include/GridCommon.ini"
|
Include-Common = "config-include/GridCommon.ini"
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
GridServices = "SimianGridServiceConnector"
|
GridServices = "RemoteGridServicesConnector"
|
||||||
PresenceServices = "SimianPresenceServiceConnector"
|
PresenceServices = "SimianPresenceServiceConnector"
|
||||||
UserAccountServices = "SimianUserAccountServiceConnector"
|
UserAccountServices = "SimianUserAccountServiceConnector"
|
||||||
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
[GridService]
|
[GridService]
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector"
|
||||||
|
|
||||||
AllowHypergridMapSearch = true
|
AllowHypergridMapSearch = true
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue