aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorMelanie2012-09-12 12:56:59 +0200
committerMelanie2012-09-12 12:56:59 +0200
commit5139db2638fcee945961ea8d5635def581b54a4d (patch)
tree686d86730ac326364e88a5c60f7a27fbcfaff49e /OpenSim/Region/ClientStack/Linden
parentAdd a missing brace, remove a useless temp variable, enable charging. (diff)
downloadopensim-SC-5139db2638fcee945961ea8d5635def581b54a4d.zip
opensim-SC-5139db2638fcee945961ea8d5635def581b54a4d.tar.gz
opensim-SC-5139db2638fcee945961ea8d5635def581b54a4d.tar.bz2
opensim-SC-5139db2638fcee945961ea8d5635def581b54a4d.tar.xz
Add a timer to time out upload caps handlers that are not used.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 9982556..c4a9a19 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Timers;
29using System.Collections; 30using System.Collections;
30using System.Collections.Generic; 31using System.Collections.Generic;
31using System.IO; 32using System.IO;
@@ -1106,6 +1107,7 @@ namespace OpenSim.Region.ClientStack.Linden
1106 1107
1107 private string m_invType = String.Empty; 1108 private string m_invType = String.Empty;
1108 private string m_assetType = String.Empty; 1109 private string m_assetType = String.Empty;
1110 private Timer m_timeoutTimer = new Timer();
1109 1111
1110 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, 1112 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
1111 UUID parentFolderID, string invType, string assetType, string path, 1113 UUID parentFolderID, string invType, string assetType, string path,
@@ -1121,6 +1123,11 @@ namespace OpenSim.Region.ClientStack.Linden
1121 m_assetType = assetType; 1123 m_assetType = assetType;
1122 m_invType = invType; 1124 m_invType = invType;
1123 m_dumpAssetsToFile = dumpAssetsToFile; 1125 m_dumpAssetsToFile = dumpAssetsToFile;
1126
1127 m_timeoutTimer.Elapsed += TimedOut;
1128 m_timeoutTimer.Interval = 120000;
1129 m_timeoutTimer.AutoReset = false;
1130 m_timeoutTimer.Start();
1124 } 1131 }
1125 1132
1126 /// <summary> 1133 /// <summary>
@@ -1163,6 +1170,11 @@ namespace OpenSim.Region.ClientStack.Linden
1163 return res; 1170 return res;
1164 } 1171 }
1165 1172
1173 private void TimedOut(object sender, ElapsedEventArgs args)
1174 {
1175 httpListener.RemoveStreamHandler("POST", uploaderPath);
1176 }
1177
1166 ///Left this in and commented in case there are unforseen issues 1178 ///Left this in and commented in case there are unforseen issues
1167 //private void SaveAssetToFile(string filename, byte[] data) 1179 //private void SaveAssetToFile(string filename, byte[] data)
1168 //{ 1180 //{