aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorubit2012-07-23 20:18:07 +0200
committerubit2012-07-23 20:18:07 +0200
commit23be64c1324ddbf997bcc791192284be75506e2a (patch)
tree725d0a6ef44b4625fd71821554c5ea7a4c794f15
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parentFix double-ping on logout by not sending a stop packet to the client (diff)
downloadopensim-SC-23be64c1324ddbf997bcc791192284be75506e2a.zip
opensim-SC-23be64c1324ddbf997bcc791192284be75506e2a.tar.gz
opensim-SC-23be64c1324ddbf997bcc791192284be75506e2a.tar.bz2
opensim-SC-23be64c1324ddbf997bcc791192284be75506e2a.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs11
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs2
8 files changed, 29 insertions, 18 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 58a65de..b1f41b8 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1177,7 +1177,7 @@ namespace OpenSim.Framework
1177 /// <param name="node"></param> 1177 /// <param name="node"></param>
1178 void SendBulkUpdateInventory(InventoryNodeBase node); 1178 void SendBulkUpdateInventory(InventoryNodeBase node);
1179 1179
1180 void SendXferPacket(ulong xferID, uint packet, byte[] data); 1180 void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory);
1181 1181
1182 void SendAbortXferPacket(ulong xferID); 1182 void SendAbortXferPacket(ulong xferID);
1183 1183
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index e6289bd..ad9074c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2122,16 +2122,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2122 replytask.InventoryData.TaskID = taskID; 2122 replytask.InventoryData.TaskID = taskID;
2123 replytask.InventoryData.Serial = serial; 2123 replytask.InventoryData.Serial = serial;
2124 replytask.InventoryData.Filename = fileName; 2124 replytask.InventoryData.Filename = fileName;
2125 OutPacket(replytask, ThrottleOutPacketType.Asset); 2125 OutPacket(replytask, ThrottleOutPacketType.Task);
2126 } 2126 }
2127 2127
2128 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 2128 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
2129 { 2129 {
2130 ThrottleOutPacketType type = ThrottleOutPacketType.Asset;
2131 if (isTaskInventory)
2132 type = ThrottleOutPacketType.Task;
2133
2130 SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket); 2134 SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket);
2131 sendXfer.XferID.ID = xferID; 2135 sendXfer.XferID.ID = xferID;
2132 sendXfer.XferID.Packet = packet; 2136 sendXfer.XferID.Packet = packet;
2133 sendXfer.DataPacket.Data = data; 2137 sendXfer.DataPacket.Data = data;
2134 OutPacket(sendXfer, ThrottleOutPacketType.Asset); 2138 OutPacket(sendXfer, type);
2135 } 2139 }
2136 2140
2137 public void SendAbortXferPacket(ulong xferID) 2141 public void SendAbortXferPacket(ulong xferID)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 6e7a6a8..b09f607 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1516,7 +1516,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1516 if (!client.IsLoggingOut) 1516 if (!client.IsLoggingOut)
1517 { 1517 {
1518 client.IsLoggingOut = true; 1518 client.IsLoggingOut = true;
1519 client.Close(); 1519 client.Close(false);
1520 } 1520 }
1521 } 1521 }
1522 } 1522 }
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
index b8e2820..78d597d 100644
--- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
@@ -145,6 +145,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
145 { 145 {
146 byte[] fileData = NewFiles[fileName].Data; 146 byte[] fileData = NewFiles[fileName].Data;
147 XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient); 147 XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
148 if (fileName.StartsWith("inventory_"))
149 transaction.isTaskInventory = true;
148 150
149 Transfers.Add(xferID, transaction); 151 Transfers.Add(xferID, transaction);
150 152
@@ -228,6 +230,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
228 public uint Packet = 0; 230 public uint Packet = 0;
229 public uint Serial = 1; 231 public uint Serial = 1;
230 public ulong XferID = 0; 232 public ulong XferID = 0;
233 public bool isTaskInventory = false;
231 234
232 public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client) 235 public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client)
233 { 236 {
@@ -253,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
253 byte[] transferData = new byte[Data.Length + 4]; 256 byte[] transferData = new byte[Data.Length + 4];
254 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); 257 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
255 Array.Copy(Data, 0, transferData, 4, Data.Length); 258 Array.Copy(Data, 0, transferData, 4, Data.Length);
256 Client.SendXferPacket(XferID, 0 + 0x80000000, transferData); 259 Client.SendXferPacket(XferID, 0 + 0x80000000, transferData, isTaskInventory);
257 complete = true; 260 complete = true;
258 } 261 }
259 else 262 else
@@ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
261 byte[] transferData = new byte[1000 + 4]; 264 byte[] transferData = new byte[1000 + 4];
262 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); 265 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
263 Array.Copy(Data, 0, transferData, 4, 1000); 266 Array.Copy(Data, 0, transferData, 4, 1000);
264 Client.SendXferPacket(XferID, 0, transferData); 267 Client.SendXferPacket(XferID, 0, transferData, isTaskInventory);
265 Packet++; 268 Packet++;
266 DataPointer = 1000; 269 DataPointer = 1000;
267 } 270 }
@@ -282,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
282 { 285 {
283 byte[] transferData = new byte[1000]; 286 byte[] transferData = new byte[1000];
284 Array.Copy(Data, DataPointer, transferData, 0, 1000); 287 Array.Copy(Data, DataPointer, transferData, 0, 1000);
285 Client.SendXferPacket(XferID, Packet, transferData); 288 Client.SendXferPacket(XferID, Packet, transferData, isTaskInventory);
286 Packet++; 289 Packet++;
287 DataPointer += 1000; 290 DataPointer += 1000;
288 } 291 }
@@ -291,7 +294,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
291 byte[] transferData = new byte[Data.Length - DataPointer]; 294 byte[] transferData = new byte[Data.Length - DataPointer];
292 Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); 295 Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer);
293 uint endPacket = Packet |= (uint) 0x80000000; 296 uint endPacket = Packet |= (uint) 0x80000000;
294 Client.SendXferPacket(XferID, endPacket, transferData); 297 Client.SendXferPacket(XferID, endPacket, transferData, isTaskInventory);
295 Packet++; 298 Packet++;
296 DataPointer += (Data.Length - DataPointer); 299 DataPointer += (Data.Length - DataPointer);
297 300
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 394b90a..f073c4a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -757,18 +757,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
757 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero); 757 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero);
758 sp.RemoveAttachment(so); 758 sp.RemoveAttachment(so);
759 759
760 // We can only remove the script instances from the script engine after we've retrieved their xml state
761 // when we update the attachment item.
762 m_scene.DeleteSceneObject(so, false, false);
763
764 // Prepare sog for storage 760 // Prepare sog for storage
765 so.AttachedAvatar = UUID.Zero; 761 so.AttachedAvatar = UUID.Zero;
766 so.RootPart.SetParentLocalId(0); 762 so.RootPart.SetParentLocalId(0);
767 so.IsAttachment = false; 763 so.IsAttachment = false;
768 so.AbsolutePosition = so.RootPart.AttachedPos; 764
765 // We cannot use AbsolutePosition here because that would
766 // attempt to cross the prim as it is detached
767 so.ForEachPart(x => { x.GroupPosition = so.RootPart.AttachedPos; });
769 768
770 UpdateKnownItem(sp, so, true); 769 UpdateKnownItem(sp, so, true);
771 so.RemoveScriptInstances(true); 770
771 // This MUST happen AFTER serialization because it will
772 // either stop or remove the scripts. Both will cause scripts
773 // to be serialized in a stopped state with the true run
774 // state already lost.
775 m_scene.DeleteSceneObject(so, false, true);
772 } 776 }
773 777
774 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( 778 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 17a210b..86f33eb 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1122,7 +1122,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1122 1122
1123 } 1123 }
1124 1124
1125 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 1125 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
1126 { 1126 {
1127 1127
1128 } 1128 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 97db7e1..d00a6c0 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -755,7 +755,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
755 { 755 {
756 } 756 }
757 757
758 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) 758 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
759 { 759 {
760 } 760 }
761 public virtual void SendAbortXferPacket(ulong xferID) 761 public virtual void SendAbortXferPacket(ulong xferID)
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index e254dd8..6add130 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -732,7 +732,7 @@ namespace OpenSim.Tests.Common.Mock
732 { 732 {
733 } 733 }
734 734
735 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) 735 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
736 { 736 {
737 } 737 }
738 738