merge
commit
b5910cfdb7
|
@ -254,14 +254,12 @@ namespace OpenSim.Framework.Monitoring
|
|||
|
||||
twi.Cleanup();
|
||||
m_threads.Remove(threadID);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -360,7 +358,7 @@ namespace OpenSim.Framework.Monitoring
|
|||
List<ThreadWatchdogInfo> callbackInfos = null;
|
||||
List<ThreadWatchdogInfo> threadsToRemove = null;
|
||||
|
||||
const ThreadState thgone = ThreadState.Stopped | ThreadState.Aborted | ThreadState.AbortRequested;
|
||||
const ThreadState thgone = ThreadState.Stopped;
|
||||
|
||||
lock (m_threads)
|
||||
{
|
||||
|
@ -368,7 +366,7 @@ namespace OpenSim.Framework.Monitoring
|
|||
{
|
||||
if(!m_enabled)
|
||||
return;
|
||||
if(!threadInfo.Thread.IsAlive || (threadInfo.Thread.ThreadState & thgone) != 0)
|
||||
if((threadInfo.Thread.ThreadState & thgone) != 0)
|
||||
{
|
||||
if(threadsToRemove == null)
|
||||
threadsToRemove = new List<ThreadWatchdogInfo>();
|
||||
|
|
|
@ -1580,10 +1580,14 @@ namespace OpenSim.Framework
|
|||
{
|
||||
MediaList ml = new MediaList();
|
||||
ml.ReadXml(rawXml);
|
||||
if(ml.Count == 0)
|
||||
return null;
|
||||
return ml;
|
||||
}
|
||||
|
||||
public void ReadXml(string rawXml)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (StringReader sr = new StringReader(rawXml))
|
||||
{
|
||||
|
@ -1598,18 +1602,27 @@ namespace OpenSim.Framework
|
|||
return;
|
||||
|
||||
xtr.ReadStartElement("OSMedia");
|
||||
OSD osdp = OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
|
||||
if(osdp == null || !(osdp is OSDArray))
|
||||
return;
|
||||
|
||||
OSDArray osdMeArray = osdp as OSDArray;
|
||||
if(osdMeArray.Count == 0)
|
||||
return;
|
||||
|
||||
OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
|
||||
foreach (OSD osdMe in osdMeArray)
|
||||
{
|
||||
MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
|
||||
Add(me);
|
||||
}
|
||||
|
||||
xtr.ReadEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.Debug("PrimitiveBaseShape] error decoding MOAP xml" );
|
||||
}
|
||||
}
|
||||
|
||||
public void ReadXml(XmlReader reader)
|
||||
{
|
||||
|
|
|
@ -1577,7 +1577,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
break;
|
||||
|
||||
m_Scene.TryGetScenePresence(m_AgentID, out sp);
|
||||
if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
|
||||
if(sp == null || sp.IsChildAgent || sp.IsDeleted)
|
||||
break;
|
||||
|
||||
if(sp.IsInTransit && !sp.IsInLocalTransit)
|
||||
break;
|
||||
|
||||
client = sp.ControllingClient;
|
||||
|
@ -1699,7 +1702,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
break;
|
||||
|
||||
m_Scene.TryGetScenePresence(m_AgentID, out sp);
|
||||
if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
|
||||
if(sp == null || sp.IsChildAgent || sp.IsDeleted)
|
||||
break;
|
||||
|
||||
if(sp.IsInTransit && !sp.IsInLocalTransit)
|
||||
break;
|
||||
|
||||
client = sp.ControllingClient;
|
||||
|
@ -1807,7 +1813,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
if(sp == null || sp.IsDeleted)
|
||||
return "";
|
||||
|
||||
if(sp.IsInTransit)
|
||||
if(sp.IsInTransit && !sp.IsInLocalTransit)
|
||||
{
|
||||
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.ServiceUnavailable;
|
||||
httpResponse.AddHeader("Retry-After","30");
|
||||
|
@ -1817,7 +1823,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
|
||||
string[] ids = query.GetValues("ids");
|
||||
|
||||
|
||||
Dictionary<UUID,string> names = m_UserManager.GetUsersNames(ids);
|
||||
|
||||
OSDMap osdReply = new OSDMap();
|
||||
|
@ -1833,12 +1838,18 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
|
||||
string[] parts = kvp.Value.Split(new char[] {' '});
|
||||
OSDMap osdname = new OSDMap();
|
||||
|
||||
// dont tell about unknown users, we can't send them back on Bad either
|
||||
if(parts[0] == "Unknown")
|
||||
continue;
|
||||
/*
|
||||
if(parts[0] == "Unknown")
|
||||
{
|
||||
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
|
||||
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
|
||||
}
|
||||
else
|
||||
*/
|
||||
{
|
||||
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
|
||||
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
|
||||
|
|
|
@ -6473,8 +6473,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
|
||||
ScenePresence sp = (ScenePresence)SceneAgent;
|
||||
if(sp == null || sp.IsDeleted || (sp.IsInTransit && !sp.IsInLocalTransit))
|
||||
return true;
|
||||
|
||||
UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
|
||||
|
||||
for (int i = 0; i < upack.UUIDNameBlock.Length; i++)
|
||||
{
|
||||
|
@ -7493,7 +7496,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
SendUserInfoReply(false, true, "");
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private bool HandleUpdateUserInfo(IClientAPI sender, Packet Pack)
|
||||
|
@ -9648,6 +9650,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
private bool HandleUUIDNameRequest(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
ScenePresence sp = (ScenePresence)SceneAgent;
|
||||
if(sp == null || sp.IsDeleted || (sp.IsInTransit && !sp.IsInLocalTransit))
|
||||
return true;
|
||||
|
||||
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
||||
|
||||
foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
|
||||
|
|
|
@ -1168,7 +1168,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
|||
|
||||
con.Output("FloatSam Ensuring assets are cached for all scenes.");
|
||||
|
||||
WorkManager.RunInThread(delegate
|
||||
WorkManager.RunInThreadPool(delegate
|
||||
{
|
||||
bool wasRunning= false;
|
||||
lock(timerLock)
|
||||
|
|
|
@ -771,8 +771,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
else if (sp.Flying)
|
||||
teleportFlags |= (uint)TeleportFlags.IsFlying;
|
||||
|
||||
sp.IsInLocalTransit = finalDestination.RegionLocY != 0; // HG
|
||||
sp.IsInTransit = true;
|
||||
|
||||
|
||||
if (DisableInterRegionTeleportCancellation)
|
||||
teleportFlags |= (uint)TeleportFlags.DisableCancel;
|
||||
|
||||
|
@ -1524,6 +1526,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
|
||||
public bool Cross(ScenePresence agent, bool isFlying)
|
||||
{
|
||||
agent.IsInLocalTransit = true;
|
||||
agent.IsInTransit = true;
|
||||
CrossAsyncDelegate d = CrossAsync;
|
||||
d.BeginInvoke(agent, isFlying, CrossCompleted, d);
|
||||
|
|
|
@ -175,6 +175,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
|||
{
|
||||
client.OnNameFromUUIDRequest -= new UUIDNameRequest(HandleUUIDNameRequest);
|
||||
client.OnAvatarPickerRequest -= new AvatarPickerRequest(HandleAvatarPickerRequest);
|
||||
client.OnConnectionClosed -= new Action<IClientAPI>(HandleConnectionClosed);
|
||||
}
|
||||
|
||||
protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client)
|
||||
|
|
|
@ -394,6 +394,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// asynchronously from the update loop.
|
||||
/// </summary>
|
||||
private bool m_cleaningTemps = false;
|
||||
private bool m_sendingCoarseLocations = false; // same for async course locations sending
|
||||
|
||||
/// <summary>
|
||||
/// Used to control main scene thread looping time when not updating via timer.
|
||||
|
@ -1654,18 +1655,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (Frame % m_update_entitymovement == 0)
|
||||
m_sceneGraph.UpdateScenePresenceMovement();
|
||||
|
||||
if (Frame % (m_update_coarse_locations) == 0)
|
||||
if (Frame % (m_update_coarse_locations) == 0 && !m_sendingCoarseLocations)
|
||||
{
|
||||
m_sendingCoarseLocations = true;
|
||||
WorkManager.RunInThreadPool(
|
||||
delegate
|
||||
{
|
||||
List<Vector3> coarseLocations;
|
||||
List<UUID> avatarUUIDs;
|
||||
|
||||
SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60);
|
||||
// Send coarse locations to clients
|
||||
ForEachScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
presence.SendCoarseLocations(coarseLocations, avatarUUIDs);
|
||||
});
|
||||
m_sendingCoarseLocations = false;
|
||||
}, null, string.Format("SendCoarseLocations ({0})", Name));
|
||||
}
|
||||
|
||||
// Get the simulation frame time that the avatar force input
|
||||
// took
|
||||
tmpMS2 = Util.GetTimeStampMS();
|
||||
|
@ -1708,7 +1715,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)
|
||||
{
|
||||
m_cleaningTemps = true;
|
||||
WorkManager.RunInThread(
|
||||
WorkManager.RunInThreadPool(
|
||||
delegate { CleanTempObjects(); m_cleaningTemps = false; }, null, string.Format("CleanTempObjects ({0})", Name));
|
||||
tmpMS2 = Util.GetTimeStampMS();
|
||||
tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects
|
||||
|
@ -1936,7 +1943,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (!m_backingup)
|
||||
{
|
||||
m_backingup = true;
|
||||
WorkManager.RunInThread(o => Backup(false), null, string.Format("BackupWorker ({0})", Name));
|
||||
WorkManager.RunInThreadPool(o => Backup(false), null, string.Format("BackupWorker ({0})", Name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -807,6 +807,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
foreach (avtocrossInfo avinfo in avsToCross)
|
||||
{
|
||||
ScenePresence av = avinfo.av;
|
||||
av.IsInLocalTransit = true;
|
||||
av.IsInTransit = true;
|
||||
m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar {0} to {1}", av.Name, val);
|
||||
|
||||
|
|
|
@ -91,7 +91,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </value>
|
||||
protected internal TaskInventoryDictionary Items
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
return m_items;
|
||||
}
|
||||
set
|
||||
|
@ -141,45 +142,53 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </remarks>
|
||||
public void ResetInventoryIDs()
|
||||
{
|
||||
if (null == m_part)
|
||||
m_items.LockItemsForWrite(true);
|
||||
if (m_part == null)
|
||||
return;
|
||||
|
||||
if (Items.Count == 0)
|
||||
m_items.LockItemsForWrite(true);
|
||||
if (m_items.Count == 0)
|
||||
{
|
||||
m_items.LockItemsForWrite(false);
|
||||
return;
|
||||
}
|
||||
|
||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
||||
Items.Clear();
|
||||
UUID partID = m_part.UUID;
|
||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(m_items.Values);
|
||||
m_items.Clear();
|
||||
|
||||
foreach (TaskInventoryItem item in items)
|
||||
{
|
||||
item.ResetIDs(m_part.UUID);
|
||||
Items.Add(item.ItemID, item);
|
||||
item.ResetIDs(partID);
|
||||
m_items.Add(item.ItemID, item);
|
||||
}
|
||||
m_inventorySerial++;
|
||||
m_items.LockItemsForWrite(false);
|
||||
}
|
||||
|
||||
public void ResetObjectID()
|
||||
{
|
||||
if (m_part == null)
|
||||
return;
|
||||
|
||||
m_items.LockItemsForWrite(true);
|
||||
|
||||
if (Items.Count == 0)
|
||||
if (m_items.Count == 0)
|
||||
{
|
||||
m_items.LockItemsForWrite(false);
|
||||
return;
|
||||
}
|
||||
|
||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
||||
Items.Clear();
|
||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(m_items.Values);
|
||||
m_items.Clear();
|
||||
|
||||
UUID partID = m_part.UUID;
|
||||
foreach (TaskInventoryItem item in items)
|
||||
{
|
||||
item.ParentPartID = m_part.UUID;
|
||||
item.ParentID = m_part.UUID;
|
||||
Items.Add(item.ItemID, item);
|
||||
item.ParentPartID = partID;
|
||||
item.ParentID = partID;
|
||||
m_items.Add(item.ItemID, item);
|
||||
}
|
||||
m_inventorySerial++;
|
||||
m_items.LockItemsForWrite(false);
|
||||
}
|
||||
|
||||
|
@ -189,15 +198,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="ownerId"></param>
|
||||
public void ChangeInventoryOwner(UUID ownerId)
|
||||
{
|
||||
List<TaskInventoryItem> items = GetInventoryItems();
|
||||
|
||||
if (items.Count == 0)
|
||||
if(m_part == null)
|
||||
return;
|
||||
|
||||
m_items.LockItemsForWrite(true);
|
||||
HasInventoryChanged = true;
|
||||
m_part.ParentGroup.HasGroupChanged = true;
|
||||
foreach (TaskInventoryItem item in items)
|
||||
if (m_items.Count == 0)
|
||||
{
|
||||
m_items.LockItemsForWrite(false);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (ownerId != item.OwnerID)
|
||||
item.LastOwnerID = item.OwnerID;
|
||||
|
@ -207,6 +218,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
item.PermsGranter = UUID.Zero;
|
||||
item.OwnerChanged = true;
|
||||
}
|
||||
HasInventoryChanged = true;
|
||||
m_part.ParentGroup.HasGroupChanged = true;
|
||||
m_inventorySerial++;
|
||||
m_items.LockItemsForWrite(false);
|
||||
}
|
||||
|
@ -217,8 +230,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="groupID"></param>
|
||||
public void ChangeInventoryGroup(UUID groupID)
|
||||
{
|
||||
if(m_part == null)
|
||||
return;
|
||||
|
||||
m_items.LockItemsForWrite(true);
|
||||
if (0 == Items.Count)
|
||||
if (m_items.Count == 0)
|
||||
{
|
||||
m_items.LockItemsForWrite(false);
|
||||
return;
|
||||
|
@ -233,11 +249,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_part.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
|
||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
||||
foreach (TaskInventoryItem item in items)
|
||||
{
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
item.GroupID = groupID;
|
||||
}
|
||||
|
||||
m_items.LockItemsForWrite(false);
|
||||
}
|
||||
|
||||
|
@ -246,8 +260,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (m_part == null || m_part.ParentGroup == null || m_part.ParentGroup.Scene == null)
|
||||
return;
|
||||
|
||||
Items.LockItemsForRead(true);
|
||||
foreach (TaskInventoryItem item in Items.Values)
|
||||
m_items.LockItemsForRead(true);
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
|
@ -257,7 +271,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
}
|
||||
|
||||
public bool TryGetScriptInstanceRunning(UUID itemId, out bool running)
|
||||
|
@ -345,7 +359,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void StopScriptInstances()
|
||||
{
|
||||
GetInventoryItems(InventoryType.LSL).ForEach(i => StopScriptInstance(i));
|
||||
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
|
||||
foreach (TaskInventoryItem item in scripts)
|
||||
StopScriptInstance(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -807,7 +823,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
m_part.AggregateInnerPerms();
|
||||
m_inventorySerial++;
|
||||
//m_inventorySerial += 2;
|
||||
HasInventoryChanged = true;
|
||||
m_part.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
|
@ -1126,18 +1141,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
bool changed = false;
|
||||
|
||||
Items.LockItemsForRead(true);
|
||||
m_items.LockItemsForRead(true);
|
||||
|
||||
if (m_inventorySerial == 0) // No inventory
|
||||
{
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_items.Count == 0) // No inventory
|
||||
{
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
|
||||
return;
|
||||
}
|
||||
|
@ -1148,7 +1163,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
changed = true;
|
||||
}
|
||||
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
|
||||
if (m_inventoryFileData.Length < 2)
|
||||
changed = true;
|
||||
|
@ -1173,7 +1188,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero);
|
||||
|
||||
Items.LockItemsForRead(true);
|
||||
m_items.LockItemsForRead(true);
|
||||
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
|
@ -1234,7 +1249,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
invString.AddSectionEnd();
|
||||
}
|
||||
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
|
||||
m_inventoryFileData = Utils.StringToBytes(invString.GetString());
|
||||
|
||||
|
@ -1264,10 +1279,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// of prim inventory loss.
|
||||
// if (HasInventoryChanged)
|
||||
// {
|
||||
Items.LockItemsForRead(true);
|
||||
ICollection<TaskInventoryItem> itemsvalues = Items.Values;
|
||||
m_items.LockItemsForRead(true);
|
||||
ICollection<TaskInventoryItem> itemsvalues = m_items.Values;
|
||||
HasInventoryChanged = false;
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
try
|
||||
{
|
||||
datastore.StorePrimInventory(m_part.UUID, itemsvalues);
|
||||
|
@ -1434,15 +1449,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public int ScriptCount()
|
||||
{
|
||||
int count = 0;
|
||||
Items.LockItemsForRead(true);
|
||||
m_items.LockItemsForRead(true);
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(false);
|
||||
return count;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1465,48 +1478,44 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (engine != null)
|
||||
{
|
||||
if (engine.GetScriptState(item.ItemID))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public List<UUID> GetInventoryList()
|
||||
{
|
||||
List<UUID> ret = new List<UUID>();
|
||||
m_items.LockItemsForRead(true);
|
||||
|
||||
List<UUID> ret = new List<UUID>(m_items.Count);
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
ret.Add(item.ItemID);
|
||||
|
||||
m_items.LockItemsForRead(false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<TaskInventoryItem> GetInventoryItems()
|
||||
{
|
||||
List<TaskInventoryItem> ret = new List<TaskInventoryItem>();
|
||||
|
||||
Items.LockItemsForRead(true);
|
||||
ret = new List<TaskInventoryItem>(m_items.Values);
|
||||
Items.LockItemsForRead(false);
|
||||
m_items.LockItemsForRead(true);
|
||||
List<TaskInventoryItem> ret = new List<TaskInventoryItem>(m_items.Values);
|
||||
m_items.LockItemsForRead(false);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<TaskInventoryItem> GetInventoryItems(InventoryType type)
|
||||
{
|
||||
List<TaskInventoryItem> ret = new List<TaskInventoryItem>();
|
||||
|
||||
Items.LockItemsForRead(true);
|
||||
m_items.LockItemsForRead(true);
|
||||
|
||||
List<TaskInventoryItem> ret = new List<TaskInventoryItem>(m_items.Count);
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
if (item.InvType == (int)type)
|
||||
ret.Add(item);
|
||||
|
||||
Items.LockItemsForRead(false);
|
||||
|
||||
m_items.LockItemsForRead(false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -971,6 +971,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_inTransit = value;
|
||||
}
|
||||
}
|
||||
// this is is only valid if IsInTransit is true
|
||||
// only false on HG tps
|
||||
// used work arounf viewers asking source region about destination user
|
||||
public bool IsInLocalTransit {get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -1040,6 +1044,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_uuid = client.AgentId;
|
||||
LocalId = m_scene.AllocateLocalId();
|
||||
LegacySitOffsets = m_scene.LegacySitOffsets;
|
||||
IsInLocalTransit = true;
|
||||
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
|
||||
if (account != null)
|
||||
|
|
|
@ -1361,10 +1361,28 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
|
||||
private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader)
|
||||
{
|
||||
// Get inner XML and pass to MediaList parser
|
||||
string value = reader.ReadInnerXml();
|
||||
string value = String.Empty;
|
||||
try
|
||||
{
|
||||
// The STANDARD content of Media elemet is escaped XML string (with > etc).
|
||||
value = reader.ReadElementContentAsString("Media", String.Empty);
|
||||
shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
|
||||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
// There are versions of OAR files that contain unquoted XML.
|
||||
// ie ONE comercial fork that never wanted their oars to be read by our code
|
||||
try
|
||||
{
|
||||
value = reader.ReadInnerXml();
|
||||
shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.ErrorFormat("[SERIALIZER] Failed parsing halcyon MOAP information");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -936,7 +936,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
repData.actor.Name, asset.ID.ToString());
|
||||
}
|
||||
else
|
||||
m_log.WarnFormat("[PHYSICS]: asset provider returned null asset fo mesh of prim {0}.",
|
||||
m_log.WarnFormat("[PHYSICS]: asset provider returned null asset for mesh of prim {0}.",
|
||||
repData.actor.Name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
;; The XML here has the same format as it does on the filesystem
|
||||
;; (including the <Root> tag), except that everything is also enclosed
|
||||
;; in a <Regions> tag.
|
||||
; regionload_webserver_url = "http://example.com/regions.xml";
|
||||
; regionload_webserver_url = "http://example.com/regions.xml"
|
||||
|
||||
;# {allow_regionless} {} {Allow simulator to start up with no regions configured.} {true false} false
|
||||
;; Allow the simulator to start up if there are no region configuration available
|
||||
|
@ -286,8 +286,8 @@
|
|||
;; SpawnPointRouting adjusts the landing for incoming avatars.
|
||||
;; "closest" will place the avatar at the SpawnPoint located in the closest
|
||||
;; available spot to the destination (typically map click/landmark).
|
||||
;; "random" will place the avatar on a randomly selected spawnpoint;
|
||||
;; "sequence" will place the avatar on the next sequential SpawnPoint
|
||||
;; "random" will place the avatar on a randomly selected spawnpoint.
|
||||
;; "sequence" will place the avatar on the next sequential SpawnPoint.
|
||||
; SpawnPointRouting = closest
|
||||
|
||||
;# {TelehubAllowLandmark} {} {Allow users with landmarks to override telehub routing} {true false} false
|
||||
|
@ -375,8 +375,8 @@
|
|||
; TexturePrimSize = 48
|
||||
|
||||
;# {RenderMeshes} {} {Render meshes and sculpties on map tiles?} {true false} false
|
||||
;; Attempt to render meshes and sculpties on the map
|
||||
; RenderMeshes = false;
|
||||
;; Attempt to render meshes and sculpties on the map.
|
||||
; RenderMeshes = false
|
||||
|
||||
|
||||
[Permissions]
|
||||
|
@ -585,7 +585,7 @@
|
|||
;; web server
|
||||
; user_agent = "OpenSim LSL (Mozilla Compatible)"
|
||||
|
||||
;; The follow 3 variables are for HTTP Basic Authentication for the Robust services.
|
||||
;; The following 3 variables are for HTTP Basic Authentication for the Robust services.
|
||||
;; Use this if your central services in port 8003 need to be accessible on the Internet
|
||||
;; but you want to protect them from unauthorized access. The username and password
|
||||
;; here need to match the ones in the Robust service configuration.
|
||||
|
@ -650,7 +650,6 @@
|
|||
|
||||
|
||||
[SimulatorFeatures]
|
||||
|
||||
;# {SearchServerURI} {} {URL of the search server} {}
|
||||
;; Optional. If given this serves the same purpose as the grid wide
|
||||
;; [LoginServices] SearchURL setting and will override that where
|
||||
|
@ -707,7 +706,7 @@
|
|||
;; For standalones, this is the storage dll.
|
||||
; StorageProvider = OpenSim.Data.MySQL.dll
|
||||
|
||||
;# {MuteListModule} {OfflineMessageModule:OfflineMessageModule} {} {} MuteListModule
|
||||
;# {MuteListModule} {OfflineMessageModule:OfflineMessageModule} {} {} None
|
||||
;; Mute list handler (not yet implemented). MUST BE SET to allow offline
|
||||
;; messages to work
|
||||
; MuteListModule = MuteListModule
|
||||
|
@ -1163,7 +1162,7 @@
|
|||
[MediaOnAPrim]
|
||||
;# {Enabled} {} {Enable Media-on-a-Prim (MOAP)} {true false} true
|
||||
;; Enable media on a prim facilities
|
||||
; Enabled = true;
|
||||
; Enabled = true
|
||||
|
||||
|
||||
[NPC]
|
||||
|
|
Loading…
Reference in New Issue