Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
23be64c132
|
@ -1177,7 +1177,7 @@ namespace OpenSim.Framework
|
||||||
/// <param name="node"></param>
|
/// <param name="node"></param>
|
||||||
void SendBulkUpdateInventory(InventoryNodeBase node);
|
void SendBulkUpdateInventory(InventoryNodeBase node);
|
||||||
|
|
||||||
void SendXferPacket(ulong xferID, uint packet, byte[] data);
|
void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory);
|
||||||
|
|
||||||
void SendAbortXferPacket(ulong xferID);
|
void SendAbortXferPacket(ulong xferID);
|
||||||
|
|
||||||
|
|
|
@ -2122,16 +2122,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
replytask.InventoryData.TaskID = taskID;
|
replytask.InventoryData.TaskID = taskID;
|
||||||
replytask.InventoryData.Serial = serial;
|
replytask.InventoryData.Serial = serial;
|
||||||
replytask.InventoryData.Filename = fileName;
|
replytask.InventoryData.Filename = fileName;
|
||||||
OutPacket(replytask, ThrottleOutPacketType.Asset);
|
OutPacket(replytask, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendXferPacket(ulong xferID, uint packet, byte[] data)
|
public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
|
||||||
{
|
{
|
||||||
|
ThrottleOutPacketType type = ThrottleOutPacketType.Asset;
|
||||||
|
if (isTaskInventory)
|
||||||
|
type = ThrottleOutPacketType.Task;
|
||||||
|
|
||||||
SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket);
|
SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket);
|
||||||
sendXfer.XferID.ID = xferID;
|
sendXfer.XferID.ID = xferID;
|
||||||
sendXfer.XferID.Packet = packet;
|
sendXfer.XferID.Packet = packet;
|
||||||
sendXfer.DataPacket.Data = data;
|
sendXfer.DataPacket.Data = data;
|
||||||
OutPacket(sendXfer, ThrottleOutPacketType.Asset);
|
OutPacket(sendXfer, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAbortXferPacket(ulong xferID)
|
public void SendAbortXferPacket(ulong xferID)
|
||||||
|
|
|
@ -1516,7 +1516,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (!client.IsLoggingOut)
|
if (!client.IsLoggingOut)
|
||||||
{
|
{
|
||||||
client.IsLoggingOut = true;
|
client.IsLoggingOut = true;
|
||||||
client.Close();
|
client.Close(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
{
|
{
|
||||||
byte[] fileData = NewFiles[fileName].Data;
|
byte[] fileData = NewFiles[fileName].Data;
|
||||||
XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
|
XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
|
||||||
|
if (fileName.StartsWith("inventory_"))
|
||||||
|
transaction.isTaskInventory = true;
|
||||||
|
|
||||||
Transfers.Add(xferID, transaction);
|
Transfers.Add(xferID, transaction);
|
||||||
|
|
||||||
|
@ -228,6 +230,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
public uint Packet = 0;
|
public uint Packet = 0;
|
||||||
public uint Serial = 1;
|
public uint Serial = 1;
|
||||||
public ulong XferID = 0;
|
public ulong XferID = 0;
|
||||||
|
public bool isTaskInventory = false;
|
||||||
|
|
||||||
public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client)
|
public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client)
|
||||||
{
|
{
|
||||||
|
@ -253,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
byte[] transferData = new byte[Data.Length + 4];
|
byte[] transferData = new byte[Data.Length + 4];
|
||||||
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
||||||
Array.Copy(Data, 0, transferData, 4, Data.Length);
|
Array.Copy(Data, 0, transferData, 4, Data.Length);
|
||||||
Client.SendXferPacket(XferID, 0 + 0x80000000, transferData);
|
Client.SendXferPacket(XferID, 0 + 0x80000000, transferData, isTaskInventory);
|
||||||
complete = true;
|
complete = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
byte[] transferData = new byte[1000 + 4];
|
byte[] transferData = new byte[1000 + 4];
|
||||||
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
||||||
Array.Copy(Data, 0, transferData, 4, 1000);
|
Array.Copy(Data, 0, transferData, 4, 1000);
|
||||||
Client.SendXferPacket(XferID, 0, transferData);
|
Client.SendXferPacket(XferID, 0, transferData, isTaskInventory);
|
||||||
Packet++;
|
Packet++;
|
||||||
DataPointer = 1000;
|
DataPointer = 1000;
|
||||||
}
|
}
|
||||||
|
@ -282,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
{
|
{
|
||||||
byte[] transferData = new byte[1000];
|
byte[] transferData = new byte[1000];
|
||||||
Array.Copy(Data, DataPointer, transferData, 0, 1000);
|
Array.Copy(Data, DataPointer, transferData, 0, 1000);
|
||||||
Client.SendXferPacket(XferID, Packet, transferData);
|
Client.SendXferPacket(XferID, Packet, transferData, isTaskInventory);
|
||||||
Packet++;
|
Packet++;
|
||||||
DataPointer += 1000;
|
DataPointer += 1000;
|
||||||
}
|
}
|
||||||
|
@ -291,7 +294,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
byte[] transferData = new byte[Data.Length - DataPointer];
|
byte[] transferData = new byte[Data.Length - DataPointer];
|
||||||
Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer);
|
Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer);
|
||||||
uint endPacket = Packet |= (uint) 0x80000000;
|
uint endPacket = Packet |= (uint) 0x80000000;
|
||||||
Client.SendXferPacket(XferID, endPacket, transferData);
|
Client.SendXferPacket(XferID, endPacket, transferData, isTaskInventory);
|
||||||
Packet++;
|
Packet++;
|
||||||
DataPointer += (Data.Length - DataPointer);
|
DataPointer += (Data.Length - DataPointer);
|
||||||
|
|
||||||
|
|
|
@ -757,18 +757,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero);
|
m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero);
|
||||||
sp.RemoveAttachment(so);
|
sp.RemoveAttachment(so);
|
||||||
|
|
||||||
// We can only remove the script instances from the script engine after we've retrieved their xml state
|
|
||||||
// when we update the attachment item.
|
|
||||||
m_scene.DeleteSceneObject(so, false, false);
|
|
||||||
|
|
||||||
// Prepare sog for storage
|
// Prepare sog for storage
|
||||||
so.AttachedAvatar = UUID.Zero;
|
so.AttachedAvatar = UUID.Zero;
|
||||||
so.RootPart.SetParentLocalId(0);
|
so.RootPart.SetParentLocalId(0);
|
||||||
so.IsAttachment = false;
|
so.IsAttachment = false;
|
||||||
so.AbsolutePosition = so.RootPart.AttachedPos;
|
|
||||||
|
// We cannot use AbsolutePosition here because that would
|
||||||
|
// attempt to cross the prim as it is detached
|
||||||
|
so.ForEachPart(x => { x.GroupPosition = so.RootPart.AttachedPos; });
|
||||||
|
|
||||||
UpdateKnownItem(sp, so, true);
|
UpdateKnownItem(sp, so, true);
|
||||||
so.RemoveScriptInstances(true);
|
|
||||||
|
// This MUST happen AFTER serialization because it will
|
||||||
|
// either stop or remove the scripts. Both will cause scripts
|
||||||
|
// to be serialized in a stopped state with the true run
|
||||||
|
// state already lost.
|
||||||
|
m_scene.DeleteSceneObject(so, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
|
protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendXferPacket(ulong xferID, uint packet, byte[] data)
|
public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -755,7 +755,7 @@ 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, bool isTaskInventory)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public virtual void SendAbortXferPacket(ulong xferID)
|
public virtual void SendAbortXferPacket(ulong xferID)
|
||||||
|
|
|
@ -732,7 +732,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
|
public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue