aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs11
1 files changed, 7 insertions, 4 deletions
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