aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2009-09-21 11:05:20 -0700
committerDiva Canto2009-09-21 11:05:20 -0700
commit6d0e7b6a6caa7653d9d74fe7ca1b0c992362d735 (patch)
tree552d9966f891056b3fac1868aefb7491bf381882
parentAdded grid handler and grid remote connector. (diff)
parentAdd a UUID param to NoEvents in PollServiceEventArgs to make it more generic (diff)
downloadopensim-SC-6d0e7b6a6caa7653d9d74fe7ca1b0c992362d735.zip
opensim-SC-6d0e7b6a6caa7653d9d74fe7ca1b0c992362d735.tar.gz
opensim-SC-6d0e7b6a6caa7653d9d74fe7ca1b0c992362d735.tar.bz2
opensim-SC-6d0e7b6a6caa7653d9d74fe7ca1b0c992362d735.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs13
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs4
5 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index 67bff4c..5a18b94 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -197,7 +197,7 @@ namespace OpenSim.Framework.Console
197 197
198 string uri = "/ReadResponses/" + sessionID.ToString() + "/"; 198 string uri = "/ReadResponses/" + sessionID.ToString() + "/";
199 199
200 m_Server.AddPollServiceHTTPHandler(uri, HandleHttpCloseSession, 200 m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll,
201 new PollServiceEventArgs(HasEvents, GetEvents, NoEvents, 201 new PollServiceEventArgs(HasEvents, GetEvents, NoEvents,
202 sessionID)); 202 sessionID));
203 203
@@ -230,6 +230,11 @@ namespace OpenSim.Framework.Console
230 return reply; 230 return reply;
231 } 231 }
232 232
233 private Hashtable HandleHttpPoll(Hashtable request)
234 {
235 return new Hashtable();
236 }
237
233 private Hashtable HandleHttpCloseSession(Hashtable request) 238 private Hashtable HandleHttpCloseSession(Hashtable request)
234 { 239 {
235 DoExpire(); 240 DoExpire();
@@ -388,12 +393,12 @@ namespace OpenSim.Framework.Console
388 lock (m_Connections) 393 lock (m_Connections)
389 { 394 {
390 if (!m_Connections.ContainsKey(sessionID)) 395 if (!m_Connections.ContainsKey(sessionID))
391 return NoEvents(); 396 return NoEvents(UUID.Zero);
392 c = m_Connections[sessionID]; 397 c = m_Connections[sessionID];
393 } 398 }
394 c.last = System.Environment.TickCount; 399 c.last = System.Environment.TickCount;
395 if (c.lastLineSeen >= m_LineNumber) 400 if (c.lastLineSeen >= m_LineNumber)
396 return NoEvents(); 401 return NoEvents(UUID.Zero);
397 402
398 Hashtable result = new Hashtable(); 403 Hashtable result = new Hashtable();
399 404
@@ -435,7 +440,7 @@ namespace OpenSim.Framework.Console
435 return result; 440 return result;
436 } 441 }
437 442
438 private Hashtable NoEvents() 443 private Hashtable NoEvents(UUID id)
439 { 444 {
440 Hashtable result = new Hashtable(); 445 Hashtable result = new Hashtable();
441 446
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index fed490e..ed387d1 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers.HttpServer
34 34
35 public delegate Hashtable GetEventsMethod(UUID pId, string request); 35 public delegate Hashtable GetEventsMethod(UUID pId, string request);
36 36
37 public delegate Hashtable NoEventsMethod(); 37 public delegate Hashtable NoEventsMethod(UUID pId);
38 38
39 public class PollServiceEventArgs : EventArgs 39 public class PollServiceEventArgs : EventArgs
40 { 40 {
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 4020190..db80f1d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Servers.HttpServer
130 foreach (object o in m_requests) 130 foreach (object o in m_requests)
131 { 131 {
132 PollServiceHttpRequest req = (PollServiceHttpRequest) o; 132 PollServiceHttpRequest req = (PollServiceHttpRequest) o;
133 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext)); 133 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.PollServiceArgs.Id), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
134 } 134 }
135 135
136 m_requests.Clear(); 136 m_requests.Clear();
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 41fb376..1e8706c 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Servers.HttpServer
112 { 112 {
113 if ((Environment.TickCount - req.RequestTime) > m_timeout) 113 if ((Environment.TickCount - req.RequestTime) > m_timeout)
114 { 114 {
115 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(), 115 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.PollServiceArgs.Id),
116 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext)); 116 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext));
117 } 117 }
118 else 118 else
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
index 34d46a0..26eed42 100644
--- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
@@ -350,7 +350,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
350 lock (queue) 350 lock (queue)
351 { 351 {
352 if (queue.Count == 0) 352 if (queue.Count == 0)
353 return NoEvents(); 353 return NoEvents(pAgentId);
354 element = queue.Dequeue(); // 15s timeout 354 element = queue.Dequeue(); // 15s timeout
355 } 355 }
356 356
@@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
398 //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); 398 //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
399 } 399 }
400 400
401 public Hashtable NoEvents() 401 public Hashtable NoEvents(UUID agentID)
402 { 402 {
403 Hashtable responsedata = new Hashtable(); 403 Hashtable responsedata = new Hashtable();
404 responsedata["int_response_code"] = 502; 404 responsedata["int_response_code"] = 502;