From 25a49ac4de056f43d6c5803fcd34804fcea96ae2 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Wed, 30 Apr 2008 23:11:07 +0000
Subject: * Spring cleaned a bunch of '//TODO: unused' marked functions.
---
.../Agent/AssetDownload/AssetDownloadModule.cs | 114 ---------------------
1 file changed, 114 deletions(-)
(limited to 'OpenSim/Region/Environment/Modules/Agent')
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
index 33e917a..c0b7380 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
@@ -178,120 +178,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
}
}
-// TODO: unused
-// private void RunAssetQueue()
-// {
-// while (true)
-// {
-// try
-// {
-// ProcessAssetQueue();
-// Thread.Sleep(500);
-// }
-// catch (Exception)
-// {
-// // m_log.Error("[ASSET CACHE]: " + e.ToString());
-// }
-// }
-// }
-
-// TODO: unused
-// ///
-// /// Process the asset queue which sends packets directly back to the client.
-// ///
-// private void ProcessAssetQueue()
-// {
-// //should move the asset downloading to a module, like has been done with texture downloading
-// if (AssetRequests.Count == 0)
-// {
-// //no requests waiting
-// return;
-// }
-// // if less than 5, do all of them
-// int num = Math.Min(5, AssetRequests.Count);
-
-// AssetRequest req;
-// for (int i = 0; i < num; i++)
-// {
-// req = (AssetRequest)AssetRequests[i];
-// //Console.WriteLine("sending asset " + req.RequestAssetID);
-// TransferInfoPacket Transfer = new TransferInfoPacket();
-// Transfer.TransferInfo.ChannelType = 2;
-// Transfer.TransferInfo.Status = 0;
-// Transfer.TransferInfo.TargetType = 0;
-// if (req.AssetRequestSource == 2)
-// {
-// Transfer.TransferInfo.Params = new byte[20];
-// Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
-// int assType = (int)req.AssetInf.Type;
-// Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
-// }
-// else if (req.AssetRequestSource == 3)
-// {
-// Transfer.TransferInfo.Params = req.Params;
-// // Transfer.TransferInfo.Params = new byte[100];
-// //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
-// //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
-// }
-// Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
-// Transfer.TransferInfo.TransferID = req.TransferRequestID;
-// req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset);
-
-// if (req.NumPackets == 1)
-// {
-// TransferPacketPacket TransferPacket = new TransferPacketPacket();
-// TransferPacket.TransferData.Packet = 0;
-// TransferPacket.TransferData.ChannelType = 2;
-// TransferPacket.TransferData.TransferID = req.TransferRequestID;
-// TransferPacket.TransferData.Data = req.AssetInf.Data;
-// TransferPacket.TransferData.Status = 1;
-// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
-// }
-// else
-// {
-// int processedLength = 0;
-// // libsecondlife hardcodes 1500 as the maximum data chunk size
-// int maxChunkSize = 1250;
-// int packetNumber = 0;
-
-// while (processedLength < req.AssetInf.Data.Length)
-// {
-// TransferPacketPacket TransferPacket = new TransferPacketPacket();
-// TransferPacket.TransferData.Packet = packetNumber;
-// TransferPacket.TransferData.ChannelType = 2;
-// TransferPacket.TransferData.TransferID = req.TransferRequestID;
-
-// int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize);
-// byte[] chunk = new byte[chunkSize];
-// Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length);
-
-// TransferPacket.TransferData.Data = chunk;
-
-// // 0 indicates more packets to come, 1 indicates last packet
-// if (req.AssetInf.Data.Length - processedLength > maxChunkSize)
-// {
-// TransferPacket.TransferData.Status = 0;
-// }
-// else
-// {
-// TransferPacket.TransferData.Status = 1;
-// }
-
-// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
-
-// processedLength += chunkSize;
-// packetNumber++;
-// }
-// }
-// }
-
-// //remove requests that have been completed
-// for (int i = 0; i < num; i++)
-// {
-// AssetRequests.RemoveAt(0);
-// }
-// }
-
///
/// Calculate the number of packets required to send the asset to the client.
///
--
cgit v1.1