aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMW2009-01-12 10:16:33 +0000
committerMW2009-01-12 10:16:33 +0000
commite1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8 (patch)
treee654e368a6d6fb908c613a1ab5c9c917d4a94397 /OpenSim/Region/ClientStack
parentMake ZERO_ROTATION.y a float. Fixes Mantis #2985. (diff)
downloadopensim-SC_OLD-e1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8.zip
opensim-SC_OLD-e1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8.tar.gz
opensim-SC_OLD-e1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8.tar.bz2
opensim-SC_OLD-e1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8.tar.xz
a little bit more work on LLFileTransfer.cs, from over the christmas/new year period. Still not working/in use but hopefully I can finish it soon.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
index e5783de..517de34 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
55 55
56 56
57 /// <summary> 57 /// <summary>
58 /// Dictionary of files to be sent to clients 58 /// Dictionary of files ready to be sent to clients
59 /// </summary> 59 /// </summary>
60 protected static Dictionary<string, byte[]> m_files; 60 protected static Dictionary<string, byte[]> m_files;
61 61
@@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
71 m_clientAPI = clientAPI; 71 m_clientAPI = clientAPI;
72 72
73 m_clientAPI.OnXferReceive += XferReceive; 73 m_clientAPI.OnXferReceive += XferReceive;
74 m_clientAPI.OnAbortXfer += AbortXferHandler; 74 m_clientAPI.OnAbortXfer += AbortXferUploadHandler;
75 } 75 }
76 76
77 public void Close() 77 public void Close()
@@ -79,11 +79,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
79 if (m_clientAPI != null) 79 if (m_clientAPI != null)
80 { 80 {
81 m_clientAPI.OnXferReceive -= XferReceive; 81 m_clientAPI.OnXferReceive -= XferReceive;
82 m_clientAPI.OnAbortXfer -= AbortXferHandler; 82 m_clientAPI.OnAbortXfer -= AbortXferUploadHandler;
83 m_clientAPI = null; 83 m_clientAPI = null;
84 } 84 }
85 } 85 }
86 86
87 #region Upload Handling
88
87 public bool RequestUpload(string clientFileName, UploadComplete uploadCompleteCallback, UploadAborted abortCallback) 89 public bool RequestUpload(string clientFileName, UploadComplete uploadCompleteCallback, UploadAborted abortCallback)
88 { 90 {
89 if ((String.IsNullOrEmpty(clientFileName)) || (uploadCompleteCallback == null)) 91 if ((String.IsNullOrEmpty(clientFileName)) || (uploadCompleteCallback == null))
@@ -111,7 +113,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
111 private bool StartUpload(XferUploadHandler uploader, UploadComplete uploadCompleteCallback, UploadAborted abortCallback) 113 private bool StartUpload(XferUploadHandler uploader, UploadComplete uploadCompleteCallback, UploadAborted abortCallback)
112 { 114 {
113 uploader.UploadDone += uploadCompleteCallback; 115 uploader.UploadDone += uploadCompleteCallback;
114 uploader.UploadDone += RemoveXferHandler; 116 uploader.UploadDone += RemoveXferUploadHandler;
115 117
116 if (abortCallback != null) 118 if (abortCallback != null)
117 { 119 {
@@ -130,7 +132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
130 { 132 {
131 // something went wrong with the xferID allocation 133 // something went wrong with the xferID allocation
132 uploader.UploadDone -= uploadCompleteCallback; 134 uploader.UploadDone -= uploadCompleteCallback;
133 uploader.UploadDone -= RemoveXferHandler; 135 uploader.UploadDone -= RemoveXferUploadHandler;
134 if (abortCallback != null) 136 if (abortCallback != null)
135 { 137 {
136 uploader.UploadAborted -= abortCallback; 138 uploader.UploadAborted -= abortCallback;
@@ -140,7 +142,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
140 } 142 }
141 } 143 }
142 144
143 protected void AbortXferHandler(IClientAPI remoteClient, ulong xferID) 145 protected void AbortXferUploadHandler(IClientAPI remoteClient, ulong xferID)
144 { 146 {
145 lock (m_uploadHandlersLock) 147 lock (m_uploadHandlersLock)
146 { 148 {
@@ -163,10 +165,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
163 } 165 }
164 } 166 }
165 167
166 protected void RemoveXferHandler(string filename, UUID fileID, ulong transferID, byte[] fileData, IClientAPI remoteClient) 168 protected void RemoveXferUploadHandler(string filename, UUID fileID, ulong transferID, byte[] fileData, IClientAPI remoteClient)
167 { 169 {
168 170
169 } 171 }
172 #endregion
173
170 } 174 }
171 175
172 public class XferUploadHandler 176 public class XferUploadHandler