Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
5321e0e69f
|
@ -1523,7 +1523,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
lock (m_entityUpdates.SyncRoot)
|
lock (m_entityUpdates.SyncRoot)
|
||||||
{
|
{
|
||||||
m_killRecord.Add(localID);
|
m_killRecord.Add(localID);
|
||||||
OutPacket(kill, ThrottleOutPacketType.State);
|
|
||||||
|
// The throttle queue used here must match that being used for updates. Otherwise, there is a
|
||||||
|
// chance that a kill packet put on a separate queue will be sent to the client before an existing
|
||||||
|
// update packet on another queue. Receiving updates after kills results in unowned and undeletable
|
||||||
|
// scene objects in a viewer until that viewer is relogged in.
|
||||||
|
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,8 +412,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loops through all of the packet queues for this client and tries to send
|
/// Loops through all of the packet queues for this client and tries to send
|
||||||
/// any outgoing packets, obeying the throttling bucket limits
|
/// an outgoing packet from each, obeying the throttling bucket limits
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
///
|
||||||
|
/// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower
|
||||||
|
/// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have
|
||||||
|
/// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the
|
||||||
|
/// wind queue).
|
||||||
|
///
|
||||||
/// <remarks>This function is only called from a synchronous loop in the
|
/// <remarks>This function is only called from a synchronous loop in the
|
||||||
/// UDPServer so we don't need to bother making this thread safe</remarks>
|
/// UDPServer so we don't need to bother making this thread safe</remarks>
|
||||||
/// <returns>True if any packets were sent, otherwise false</returns>
|
/// <returns>True if any packets were sent, otherwise false</returns>
|
||||||
|
|
|
@ -500,6 +500,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// FIXME: Implement?
|
// FIXME: Implement?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actually send a packet to a client.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="outgoingPacket"></param>
|
||||||
internal void SendPacketFinal(OutgoingPacket outgoingPacket)
|
internal void SendPacketFinal(OutgoingPacket outgoingPacket)
|
||||||
{
|
{
|
||||||
UDPPacketBuffer buffer = outgoingPacket.Buffer;
|
UDPPacketBuffer buffer = outgoingPacket.Buffer;
|
||||||
|
|
|
@ -57,6 +57,15 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// <param name="linkNum">Link number for the part</param>
|
/// <param name="linkNum">Link number for the part</param>
|
||||||
void ResetInventoryIDs();
|
void ResetInventoryIDs();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reset parent object UUID for all the items in the prim's inventory.
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
/// If this method is called and there are inventory items, then we regard the inventory as having changed.
|
||||||
|
///
|
||||||
|
/// <param name="linkNum">Link number for the part</param>
|
||||||
|
void ResetObjectID();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Change every item in this inventory to a new owner.
|
/// Change every item in this inventory to a new owner.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -500,7 +500,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part
|
// This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part
|
||||||
if (Inventory != null)
|
if (Inventory != null)
|
||||||
Inventory.ResetInventoryIDs();
|
Inventory.ResetObjectID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2763,6 +2763,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UUID = UUID.Random();
|
UUID = UUID.Random();
|
||||||
LinkNum = linkNum;
|
LinkNum = linkNum;
|
||||||
LocalId = 0;
|
LocalId = 0;
|
||||||
|
Inventory.ResetInventoryIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -140,6 +140,33 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ResetObjectID()
|
||||||
|
{
|
||||||
|
lock (Items)
|
||||||
|
{
|
||||||
|
if (Items.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
HasInventoryChanged = true;
|
||||||
|
if (m_part.ParentGroup != null)
|
||||||
|
{
|
||||||
|
m_part.ParentGroup.HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
||||||
|
Items.Clear();
|
||||||
|
|
||||||
|
foreach (TaskInventoryItem item in items)
|
||||||
|
{
|
||||||
|
item.ParentPartID = m_part.UUID;
|
||||||
|
item.ParentID = m_part.UUID;
|
||||||
|
Items.Add(item.ItemID, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Change every item in this inventory to a new owner.
|
/// Change every item in this inventory to a new owner.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
|
|
||||||
public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
|
public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
|
||||||
{
|
{
|
||||||
InventoryFolderBase folder = m_folders[folderID];
|
// InventoryFolderBase folder = m_folders[folderID];
|
||||||
|
|
||||||
// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
|
// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
|
|
||||||
public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
|
public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
|
||||||
{
|
{
|
||||||
InventoryFolderBase parentFolder = m_folders[parentID];
|
// InventoryFolderBase parentFolder = m_folders[parentID];
|
||||||
|
|
||||||
// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
|
// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
|
|
||||||
public void addInventoryItem(InventoryItemBase item)
|
public void addInventoryItem(InventoryItemBase item)
|
||||||
{
|
{
|
||||||
InventoryFolderBase folder = m_folders[item.Folder];
|
// InventoryFolderBase folder = m_folders[item.Folder];
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
|
// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
|
||||||
|
|
Loading…
Reference in New Issue