* Added a sanity check for missing asset data in LLClientView

* Moved the SL asset type to content type conversion methods from ServerUtils to OpenSim.Framework.SLUtil
* Linked content type to asset type in AssetMetadata
This commit is contained in:
John Hurliman
2010-02-20 16:21:13 -08:00
parent eb22fde96c
commit 845a390e93
5 changed files with 212 additions and 181 deletions

View File

@@ -2533,6 +2533,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendAsset(AssetRequestToClient req)
{
if (req.AssetInf.Data == null)
{
m_log.ErrorFormat("Cannot send asset {0} ({1}), asset data is null",
req.AssetInf.ID, req.AssetInf.Metadata.ContentType);
return;
}
//m_log.Debug("sending asset " + req.RequestAssetID);
TransferInfoPacket Transfer = new TransferInfoPacket();
Transfer.TransferInfo.ChannelType = 2;
@@ -16193,6 +16200,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
const uint m_maxPacketSize = 600;
int numPackets = 1;
if (data == null)
return 0;
if (data.LongLength > m_maxPacketSize)
{
// over max number of bytes so split up file