aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs12
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs25
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs34
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs6
8 files changed, 84 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 248eab6..921d3bf 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -50,6 +50,7 @@ using OpenSim.Services.Interfaces;
50using Caps = OpenSim.Framework.Capabilities.Caps; 50using Caps = OpenSim.Framework.Capabilities.Caps;
51using OSDArray = OpenMetaverse.StructuredData.OSDArray; 51using OSDArray = OpenMetaverse.StructuredData.OSDArray;
52using OSDMap = OpenMetaverse.StructuredData.OSDMap; 52using OSDMap = OpenMetaverse.StructuredData.OSDMap;
53using PermissionMask = OpenSim.Framework.PermissionMask;
53 54
54namespace OpenSim.Region.ClientStack.Linden 55namespace OpenSim.Region.ClientStack.Linden
55{ 56{
@@ -105,7 +106,6 @@ namespace OpenSim.Region.ClientStack.Linden
105 private static readonly string m_ResourceCostSelectedPath = "0103/"; 106 private static readonly string m_ResourceCostSelectedPath = "0103/";
106 private static readonly string m_UpdateAgentInformationPath = "0500/"; 107 private static readonly string m_UpdateAgentInformationPath = "0500/";
107 108
108
109 // These are callbacks which will be setup by the scene so that we can update scene data when we 109 // These are callbacks which will be setup by the scene so that we can update scene data when we
110 // receive capability calls 110 // receive capability calls
111 public NewInventoryItem AddNewInventoryItem = null; 111 public NewInventoryItem AddNewInventoryItem = null;
@@ -831,9 +831,9 @@ namespace OpenSim.Region.ClientStack.Linden
831 texitem.Folder = texturesFolder; 831 texitem.Folder = texturesFolder;
832 832
833 texitem.CurrentPermissions 833 texitem.CurrentPermissions
834 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); 834 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
835 835
836 texitem.BasePermissions = (uint)PermissionMask.All; 836 texitem.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
837 texitem.EveryOnePermissions = 0; 837 texitem.EveryOnePermissions = 0;
838 texitem.NextPermissions = (uint)PermissionMask.All; 838 texitem.NextPermissions = (uint)PermissionMask.All;
839 texitem.CreationDate = Util.UnixTimeSinceEpoch(); 839 texitem.CreationDate = Util.UnixTimeSinceEpoch();
@@ -1098,9 +1098,9 @@ namespace OpenSim.Region.ClientStack.Linden
1098 else 1098 else
1099 { 1099 {
1100 item.CurrentPermissions 1100 item.CurrentPermissions
1101 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); 1101 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
1102 1102
1103 item.BasePermissions = (uint)PermissionMask.All; 1103 item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1104 item.EveryOnePermissions = 0; 1104 item.EveryOnePermissions = 0;
1105 item.NextPermissions = (uint)PermissionMask.All; 1105 item.NextPermissions = (uint)PermissionMask.All;
1106 } 1106 }
@@ -1449,7 +1449,7 @@ namespace OpenSim.Region.ClientStack.Linden
1449 string param, IOSHttpRequest httpRequest, 1449 string param, IOSHttpRequest httpRequest,
1450 IOSHttpResponse httpResponse) 1450 IOSHttpResponse httpResponse)
1451 { 1451 {
1452 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1452// OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
1453 OSDMap resp = new OSDMap(); 1453 OSDMap resp = new OSDMap();
1454 1454
1455 OSDMap accessPrefs = new OSDMap(); 1455 OSDMap accessPrefs = new OSDMap();
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index f6e501d..37285e3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -97,6 +97,14 @@ namespace OpenSim.Region.ClientStack.Linden
97 + " >= 1 - turns on outgoing event logging\n" 97 + " >= 1 - turns on outgoing event logging\n"
98 + " >= 2 - turns on poll notification", 98 + " >= 2 - turns on poll notification",
99 HandleDebugEq); 99 HandleDebugEq);
100
101 MainConsole.Instance.Commands.AddCommand(
102 "Debug",
103 false,
104 "show eq",
105 "show eq",
106 "Show contents of event queues for logged in avatars. Used for debugging.",
107 HandleShowEq);
100 } 108 }
101 109
102 public void RemoveRegion(Scene scene) 110 public void RemoveRegion(Scene scene)
@@ -138,7 +146,7 @@ namespace OpenSim.Region.ClientStack.Linden
138 146
139 if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel))) 147 if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
140 { 148 {
141 MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]"); 149 MainConsole.Instance.OutputFormat("Usage: debug eq [0|1|2]");
142 } 150 }
143 else 151 else
144 { 152 {
@@ -148,6 +156,21 @@ namespace OpenSim.Region.ClientStack.Linden
148 } 156 }
149 } 157 }
150 158
159 protected void HandleShowEq(string module, string[] args)
160 {
161 MainConsole.Instance.OutputFormat("For scene {0}", m_scene.Name);
162
163 lock (queues)
164 {
165 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
166 {
167 MainConsole.Instance.OutputFormat(
168 "For agent {0} there are {1} messages queued for send.",
169 kvp.Key, kvp.Value.Count);
170 }
171 }
172 }
173
151 /// <summary> 174 /// <summary>
152 /// Always returns a valid queue 175 /// Always returns a valid queue
153 /// </summary> 176 /// </summary>
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index d604cf6..141af8a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -44,13 +44,15 @@ using OpenSim.Tests.Common.Mock;
44namespace OpenSim.Region.ClientStack.Linden.Tests 44namespace OpenSim.Region.ClientStack.Linden.Tests
45{ 45{
46 [TestFixture] 46 [TestFixture]
47 public class EventQueueTests 47 public class EventQueueTests : OpenSimTestCase
48 { 48 {
49 private TestScene m_scene; 49 private TestScene m_scene;
50 50
51 [SetUp] 51 [SetUp]
52 public void SetUp() 52 public override void SetUp()
53 { 53 {
54 base.SetUp();
55
54 uint port = 9999; 56 uint port = 9999;
55 uint sslPort = 9998; 57 uint sslPort = 9998;
56 58
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index d4dbfb9..a42c96c 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.ClientStack.Linden
56 public PollServiceTextureEventArgs thepoll; 56 public PollServiceTextureEventArgs thepoll;
57 public UUID reqID; 57 public UUID reqID;
58 public Hashtable request; 58 public Hashtable request;
59 public bool send503;
59 } 60 }
60 61
61 public class aPollResponse 62 public class aPollResponse
@@ -244,7 +245,19 @@ namespace OpenSim.Region.ClientStack.Linden
244 reqinfo.thepoll = this; 245 reqinfo.thepoll = this;
245 reqinfo.reqID = x; 246 reqinfo.reqID = x;
246 reqinfo.request = y; 247 reqinfo.request = y;
248 reqinfo.send503 = false;
247 249
250 lock (responses)
251 {
252 if (responses.Count > 0)
253 {
254 if (m_queue.Count >= 4)
255 {
256 // Never allow more than 4 fetches to wait
257 reqinfo.send503 = true;
258 }
259 }
260 }
248 m_queue.Enqueue(reqinfo); 261 m_queue.Enqueue(reqinfo);
249 }; 262 };
250 263
@@ -276,6 +289,22 @@ namespace OpenSim.Region.ClientStack.Linden
276 289
277 UUID requestID = requestinfo.reqID; 290 UUID requestID = requestinfo.reqID;
278 291
292 if (requestinfo.send503)
293 {
294 response = new Hashtable();
295
296 response["int_response_code"] = 503;
297 response["str_response_string"] = "Throttled";
298 response["content_type"] = "text/plain";
299 response["keepalive"] = false;
300 response["reusecontext"] = false;
301
302 lock (responses)
303 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
304
305 return;
306 }
307
279 // If the avatar is gone, don't bother to get the texture 308 // If the avatar is gone, don't bother to get the texture
280 if (m_scene.GetScenePresence(Id) == null) 309 if (m_scene.GetScenePresence(Id) == null)
281 { 310 {
@@ -385,6 +414,9 @@ namespace OpenSim.Region.ClientStack.Linden
385 GetTextureModule.aPollResponse response; 414 GetTextureModule.aPollResponse response;
386 if (responses.TryGetValue(key, out response)) 415 if (responses.TryGetValue(key, out response))
387 { 416 {
417 // This is any error response
418 if (response.bytes == 0)
419 return true;
388 420
389 // Normal 421 // Normal
390 if (BytesSent + response.bytes <= ThrottleBytes) 422 if (BytesSent + response.bytes <= ThrottleBytes)
@@ -411,12 +443,12 @@ namespace OpenSim.Region.ClientStack.Linden
411 443
412 return haskey; 444 return haskey;
413 } 445 }
446
414 public void ProcessTime() 447 public void ProcessTime()
415 { 448 {
416 PassTime(); 449 PassTime();
417 } 450 }
418 451
419
420 private void PassTime() 452 private void PassTime()
421 { 453 {
422 currenttime = Util.EnvironmentTickCount(); 454 currenttime = Util.EnvironmentTickCount();
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index 60c1814..1b68603 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -57,7 +57,6 @@ namespace OpenSim.Region.ClientStack.Linden
57 public bool Enabled { get; private set; } 57 public bool Enabled { get; private set; }
58 58
59 private Scene m_scene; 59 private Scene m_scene;
60 private UUID m_agentID;
61 60
62 #region ISharedRegionModule Members 61 #region ISharedRegionModule Members
63 62
@@ -118,13 +117,14 @@ namespace OpenSim.Region.ClientStack.Linden
118 public void RegisterCaps(UUID agentID, Caps caps) 117 public void RegisterCaps(UUID agentID, Caps caps)
119 { 118 {
120 IRequestHandler reqHandler 119 IRequestHandler reqHandler
121 = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag, "MeshUploadFlag", agentID.ToString()); 120 = new RestHTTPHandler(
121 "GET", "/CAPS/" + UUID.Random(), ht => MeshUploadFlag(ht, agentID), "MeshUploadFlag", agentID.ToString());
122 122
123 caps.RegisterHandler("MeshUploadFlag", reqHandler); 123 caps.RegisterHandler("MeshUploadFlag", reqHandler);
124 m_agentID = agentID; 124
125 } 125 }
126 126
127 private Hashtable MeshUploadFlag(Hashtable mDhttpMethod) 127 private Hashtable MeshUploadFlag(Hashtable mDhttpMethod, UUID agentID)
128 { 128 {
129// m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request"); 129// m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request");
130 130
@@ -148,4 +148,4 @@ namespace OpenSim.Region.ClientStack.Linden
148 return responsedata; 148 return responsedata;
149 } 149 }
150 } 150 }
151} \ No newline at end of file 151}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 060a61c..595d01a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
index fcac182..79d56c4 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
@@ -56,8 +56,8 @@ namespace OpenSim.Region.ClientStack.Linden
56 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")] 56 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")]
57 public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole 57 public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole
58 { 58 {
59 private static readonly ILog m_log = 59// private static readonly ILog m_log =
60 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 private Scene m_scene; 62 private Scene m_scene;
63 private IEventQueue m_eventQueue; 63 private IEventQueue m_eventQueue;
@@ -164,8 +164,8 @@ namespace OpenSim.Region.ClientStack.Linden
164 164
165 public class ConsoleHandler : BaseStreamHandler 165 public class ConsoleHandler : BaseStreamHandler
166 { 166 {
167 private static readonly ILog m_log = 167// private static readonly ILog m_log =
168 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 168// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
169 169
170 private RegionConsoleModule m_consoleModule; 170 private RegionConsoleModule m_consoleModule;
171 private UUID m_agentID; 171 private UUID m_agentID;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index 6ef8815..7d9f935 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -70,6 +70,7 @@ namespace OpenSim.Region.ClientStack.Linden
70 70
71 private string m_MapImageServerURL = string.Empty; 71 private string m_MapImageServerURL = string.Empty;
72 private string m_SearchURL = string.Empty; 72 private string m_SearchURL = string.Empty;
73 private bool m_ExportSupported = false;
73 74
74 #region ISharedRegionModule Members 75 #region ISharedRegionModule Members
75 76
@@ -87,6 +88,8 @@ namespace OpenSim.Region.ClientStack.Linden
87 } 88 }
88 89
89 m_SearchURL = config.GetString("SearchServerURI", string.Empty); 90 m_SearchURL = config.GetString("SearchServerURI", string.Empty);
91
92 m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported);
90 } 93 }
91 94
92 AddDefaultFeatures(); 95 AddDefaultFeatures();
@@ -152,6 +155,9 @@ namespace OpenSim.Region.ClientStack.Linden
152 if (m_SearchURL != string.Empty) 155 if (m_SearchURL != string.Empty)
153 gridServicesMap["search"] = m_SearchURL; 156 gridServicesMap["search"] = m_SearchURL;
154 m_features["GridServices"] = gridServicesMap; 157 m_features["GridServices"] = gridServicesMap;
158
159 if (m_ExportSupported)
160 m_features["ExportSupported"] = true;
155 } 161 }
156 } 162 }
157 163