aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2016-07-17 13:20:56 +0100
committerUbitUmarov2016-07-17 13:20:56 +0100
commit442b27222828381a27c7c5eddc967a0de4c82d0a (patch)
tree039edaa2e0a3485149e529bfb0f5ce014d6c2fc5 /OpenSim/Region
parentidentify contexts by ID now avaiable ( pipeline serialization) (diff)
downloadopensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.zip
opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.gz
opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.bz2
opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.xz
add a Drop method to PollService Event handlers, Drop requests on connections known to be lost or delay event check if they are sending a response
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs11
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs26
5 files changed, 46 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index cc614f3..18670f5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden
372 372
373 caps.RegisterPollHandler( 373 caps.RegisterPollHandler(
374 "EventQueueGet", 374 "EventQueueGet",
375 new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS)); 375 new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, Drop, agentID, SERVER_EQ_TIME_NO_EVENTS));
376 } 376 }
377 377
378 public bool HasEvents(UUID requestID, UUID agentID) 378 public bool HasEvents(UUID requestID, UUID agentID)
@@ -403,6 +403,10 @@ namespace OpenSim.Region.ClientStack.Linden
403 ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.Name); 403 ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.Name);
404 } 404 }
405 } 405 }
406 public void Drop(UUID requestID, UUID pAgentId)
407 {
408 // do nothing for now, hope client close will do it
409 }
406 410
407 public Hashtable GetEvents(UUID requestID, UUID pAgentId) 411 public Hashtable GetEvents(UUID requestID, UUID pAgentId)
408 { 412 {
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index f66ef57..7831de3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack.Linden
226 private Scene m_scene; 226 private Scene m_scene;
227 private MeshCapsDataThrottler m_throttler; 227 private MeshCapsDataThrottler m_throttler;
228 public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : 228 public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) :
229 base(null, uri, null, null, null, pId, int.MaxValue) 229 base(null, uri, null, null, null, null, pId, int.MaxValue)
230 { 230 {
231 m_scene = scene; 231 m_scene = scene;
232 m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); 232 m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId);
@@ -241,6 +241,15 @@ namespace OpenSim.Region.ClientStack.Linden
241 241
242 } 242 }
243 }; 243 };
244
245 Drop= (x, y) =>
246 {
247 lock (responses)
248 {
249 responses.Remove(x);
250 }
251 };
252
244 GetEvents = (x, y) => 253 GetEvents = (x, y) =>
245 { 254 {
246 lock (responses) 255 lock (responses)
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 14a59fe..ee7e291 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.Linden
222 private Scene m_scene; 222 private Scene m_scene;
223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); 223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000);
224 public PollServiceTextureEventArgs(UUID pId, Scene scene) : 224 public PollServiceTextureEventArgs(UUID pId, Scene scene) :
225 base(null, "", null, null, null, pId, int.MaxValue) 225 base(null, "", null, null, null, null, pId, int.MaxValue)
226 { 226 {
227 m_scene = scene; 227 m_scene = scene;
228 // x is request id, y is userid 228 // x is request id, y is userid
@@ -236,6 +236,9 @@ namespace OpenSim.Region.ClientStack.Linden
236 236
237 } 237 }
238 }; 238 };
239
240 Drop = (x, y) => { lock (responses) responses.Remove(x); };
241
239 GetEvents = (x, y) => 242 GetEvents = (x, y) =>
240 { 243 {
241 lock (responses) 244 lock (responses)
@@ -423,7 +426,6 @@ namespace OpenSim.Region.ClientStack.Linden
423 426
424 internal sealed class CapsDataThrottler 427 internal sealed class CapsDataThrottler
425 { 428 {
426
427 private volatile int currenttime = 0; 429 private volatile int currenttime = 0;
428 private volatile int lastTimeElapsed = 0; 430 private volatile int lastTimeElapsed = 0;
429 private volatile int BytesSent = 0; 431 private volatile int BytesSent = 0;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index ba4fb76..bde94e6 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -256,11 +256,13 @@ namespace OpenSim.Region.ClientStack.Linden
256 private WebFetchInvDescModule m_module; 256 private WebFetchInvDescModule m_module;
257 257
258 public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : 258 public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) :
259 base(null, url, null, null, null, pId, int.MaxValue) 259 base(null, url, null, null, null, null, pId, int.MaxValue)
260 { 260 {
261 m_module = module; 261 m_module = module;
262 262
263 HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; 263 HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); };
264 Drop = (x, y) => { lock (responses) responses.Remove(x); };
265
264 GetEvents = (x, y) => 266 GetEvents = (x, y) =>
265 { 267 {
266 lock (responses) 268 lock (responses)
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index f563c68..c118f33 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
225 string uri = "/lslhttp/" + urlcode.ToString() + "/"; 225 string uri = "/lslhttp/" + urlcode.ToString() + "/";
226 226
227 PollServiceEventArgs args 227 PollServiceEventArgs args
228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000);
229 args.Type = PollServiceEventArgs.EventType.LslHttp; 229 args.Type = PollServiceEventArgs.EventType.LslHttp;
230 m_HttpServer.AddPollServiceHTTPHandler(uri, args); 230 m_HttpServer.AddPollServiceHTTPHandler(uri, args);
231 231
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
276 string uri = "/lslhttps/" + urlcode.ToString() + "/"; 276 string uri = "/lslhttps/" + urlcode.ToString() + "/";
277 277
278 PollServiceEventArgs args 278 PollServiceEventArgs args
279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000);
280 args.Type = PollServiceEventArgs.EventType.LslHttp; 280 args.Type = PollServiceEventArgs.EventType.LslHttp;
281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args); 281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args);
282 282
@@ -530,6 +530,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
530 } 530 }
531 } 531 }
532 } 532 }
533
534 private void Drop(UUID requestID, UUID sessionID)
535 {
536 UrlData url = null;
537 lock (m_RequestMap)
538 {
539 if (m_RequestMap.ContainsKey(requestID))
540 {
541 url = m_RequestMap[requestID];
542 m_RequestMap.Remove(requestID);
543 if(url != null)
544 {
545 lock (url.requests)
546 {
547 if(url.requests.ContainsKey(requestID))
548 url.requests.Remove(requestID);
549 }
550 }
551 }
552 }
553 }
554
533 private Hashtable GetEvents(UUID requestID, UUID sessionID) 555 private Hashtable GetEvents(UUID requestID, UUID sessionID)
534 { 556 {
535 UrlData url = null; 557 UrlData url = null;