From 845a390e9308f6b6823c85ac319ecb211f968d4b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sat, 20 Feb 2010 16:21:13 -0800 Subject: * 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 --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0df1748..1f5946b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -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 -- cgit v1.1