From 40bbf886f207edd68de3a58f1f292bc613ad7cfa Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 13 Dec 2008 15:04:24 +0000 Subject: more work on moving FileTransfer code to the clientstack. Still not enabled. --- OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs index b93c37c..9d7b39e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -95,6 +95,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private bool StartUpload(XferHandler uploader, UploadComplete uploadCompleteCallback, UploadAborted abortCallback) { uploader.UploadDone += uploadCompleteCallback; + uploader.UploadDone += RemoveXferHandler; if (abortCallback != null) { @@ -113,6 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // something went wrong with the xferID allocation uploader.UploadDone -= uploadCompleteCallback; + uploader.UploadDone -= RemoveXferHandler; if (abortCallback != null) { uploader.UploadAborted -= abortCallback; @@ -144,6 +146,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } } + + protected void RemoveXferHandler(string filename, UUID fileID, byte[] fileData, IClientAPI remoteClient) + { + + } } public class XferHandler @@ -186,7 +193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_asset.FullID = fileID; m_asset.Type = type; m_asset.Data = new byte[0]; - m_asset.Name = null; + m_asset.Name = String.Empty; m_asset.Description = "empty"; m_asset.Local = true; m_asset.Temporary = true; @@ -200,7 +207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void RequestStartXfer(IClientAPI pRemoteClient) { - if (m_asset.Name != null) + if (!String.IsNullOrEmpty(m_asset.Name) ) { pRemoteClient.SendXferRequest(mXferID, m_asset.Type, m_asset.FullID, 0, Utils.StringToBytes(m_asset.Name)); } @@ -259,8 +266,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerAbort = UploadAborted; if (handlerAbort != null) { - handlerAbort(m_asset.Name, mXferID, remoteClient); + handlerAbort(m_asset.Name, m_asset.FullID, mXferID, remoteClient); } } } -} +} \ No newline at end of file -- cgit v1.1