diff options
4 files changed, 49 insertions, 19 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 277eb88..9927808 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -933,6 +933,10 @@ namespace OpenSim.Framework | |||
933 | void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount); | 933 | void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount); |
934 | void sendLandParcelOverlay(byte[] data, int sequence_id); | 934 | void sendLandParcelOverlay(byte[] data, int sequence_id); |
935 | 935 | ||
936 | void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); | ||
937 | void SendConfirmXfer(ulong xferID, uint PacketID); | ||
938 | void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); | ||
939 | |||
936 | byte[] GetThrottlesPacked(float multiplier); | 940 | byte[] GetThrottlesPacked(float multiplier); |
937 | 941 | ||
938 | 942 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2dac62d..053b077 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2200,7 +2200,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2200 | terse.Header.Zerocoded = true; | 2200 | terse.Header.Zerocoded = true; |
2201 | OutPacket(terse, ThrottleOutPacketType.Task); | 2201 | OutPacket(terse, ThrottleOutPacketType.Task); |
2202 | } | 2202 | } |
2203 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) | ||
2204 | { | ||
2205 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); | ||
2206 | newPack.AssetBlock.Type = AssetType; | ||
2207 | newPack.AssetBlock.Success = Success; | ||
2208 | newPack.AssetBlock.UUID = AssetFullID; | ||
2209 | newPack.Header.Zerocoded = true; | ||
2210 | OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
2211 | } | ||
2212 | public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) | ||
2213 | { | ||
2214 | RequestXferPacket newPack = new RequestXferPacket(); | ||
2215 | newPack.XferID.ID = XferID; | ||
2216 | newPack.XferID.VFileType = AssetType; | ||
2217 | newPack.XferID.VFileID = vFileID; | ||
2218 | newPack.XferID.FilePath = FilePath; | ||
2219 | newPack.XferID.Filename = FileName; | ||
2220 | newPack.Header.Zerocoded = true; | ||
2221 | OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
2203 | 2222 | ||
2223 | } | ||
2224 | public void SendConfirmXfer(ulong xferID, uint PacketID) | ||
2225 | { | ||
2226 | ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket(); | ||
2227 | newPack.XferID.ID = xferID; | ||
2228 | newPack.XferID.Packet = PacketID; | ||
2229 | newPack.Header.Zerocoded = true; | ||
2230 | OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
2231 | } | ||
2204 | #endregion | 2232 | #endregion |
2205 | 2233 | ||
2206 | #region Estate Data Sending Methods | 2234 | #region Estate Data Sending Methods |
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 6270893..bae23fa 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -190,11 +190,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
190 | Array.Copy(data, 4, buffer2, 0, data.Length - 4); | 190 | Array.Copy(data, 4, buffer2, 0, data.Length - 4); |
191 | Asset.Data = buffer2; | 191 | Asset.Data = buffer2; |
192 | } | 192 | } |
193 | ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket(); | 193 | |
194 | newPack.XferID.ID = xferID; | 194 | ourClient.SendConfirmXfer(xferID, packetID); |
195 | newPack.XferID.Packet = packetID; | 195 | |
196 | newPack.Header.Zerocoded = true; | ||
197 | ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
198 | if ((packetID & 0x80000000) != 0) | 196 | if ((packetID & 0x80000000) != 0) |
199 | { | 197 | { |
200 | SendCompleteMessage(); | 198 | SendCompleteMessage(); |
@@ -245,25 +243,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
245 | { | 243 | { |
246 | UploadComplete = false; | 244 | UploadComplete = false; |
247 | XferID = Util.GetNextXferID(); | 245 | XferID = Util.GetNextXferID(); |
248 | RequestXferPacket newPack = new RequestXferPacket(); | 246 | ourClient.SendXferRequest(XferID, Asset.Type, Asset.FullID, 0, new byte[0]); |
249 | newPack.XferID.ID = XferID; | ||
250 | newPack.XferID.VFileType = Asset.Type; | ||
251 | newPack.XferID.VFileID = Asset.FullID; | ||
252 | newPack.XferID.FilePath = 0; | ||
253 | newPack.XferID.Filename = new byte[0]; | ||
254 | newPack.Header.Zerocoded = true; | ||
255 | ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
256 | } | 247 | } |
257 | 248 | ||
258 | protected void SendCompleteMessage() | 249 | protected void SendCompleteMessage() |
259 | { | 250 | { |
260 | UploadComplete = true; | 251 | UploadComplete = true; |
261 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); | 252 | |
262 | newPack.AssetBlock.Type = Asset.Type; | 253 | ourClient.SendAssetUploadCompleteMessage(Asset.Type, true, Asset.FullID); |
263 | newPack.AssetBlock.Success = true; | 254 | |
264 | newPack.AssetBlock.UUID = Asset.FullID; | 255 | |
265 | newPack.Header.Zerocoded = true; | ||
266 | ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset); | ||
267 | m_finished = true; | 256 | m_finished = true; |
268 | if (m_createItem) | 257 | if (m_createItem) |
269 | { | 258 | { |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index e5e6469..bc87e53 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -519,6 +519,15 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
519 | OnCompleteMovementToRegion(); | 519 | OnCompleteMovementToRegion(); |
520 | } | 520 | } |
521 | } | 521 | } |
522 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) | ||
523 | { | ||
524 | } | ||
525 | public void SendConfirmXfer(ulong xferID, uint PacketID) | ||
526 | { | ||
527 | } | ||
528 | public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) | ||
529 | { | ||
530 | } | ||
522 | 531 | ||
523 | private void Update() | 532 | private void Update() |
524 | { | 533 | { |