Add a UUID param to NoEvents in PollServiceEventArgs to make it more generic
parent
2a1b5e3540
commit
04170521f0
|
@ -393,12 +393,12 @@ namespace OpenSim.Framework.Console
|
||||||
lock (m_Connections)
|
lock (m_Connections)
|
||||||
{
|
{
|
||||||
if (!m_Connections.ContainsKey(sessionID))
|
if (!m_Connections.ContainsKey(sessionID))
|
||||||
return NoEvents();
|
return NoEvents(UUID.Zero);
|
||||||
c = m_Connections[sessionID];
|
c = m_Connections[sessionID];
|
||||||
}
|
}
|
||||||
c.last = System.Environment.TickCount;
|
c.last = System.Environment.TickCount;
|
||||||
if (c.lastLineSeen >= m_LineNumber)
|
if (c.lastLineSeen >= m_LineNumber)
|
||||||
return NoEvents();
|
return NoEvents(UUID.Zero);
|
||||||
|
|
||||||
Hashtable result = new Hashtable();
|
Hashtable result = new Hashtable();
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ namespace OpenSim.Framework.Console
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Hashtable NoEvents()
|
private Hashtable NoEvents(UUID id)
|
||||||
{
|
{
|
||||||
Hashtable result = new Hashtable();
|
Hashtable result = new Hashtable();
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
public delegate Hashtable GetEventsMethod(UUID pId, string request);
|
public delegate Hashtable GetEventsMethod(UUID pId, string request);
|
||||||
|
|
||||||
public delegate Hashtable NoEventsMethod();
|
public delegate Hashtable NoEventsMethod(UUID pId);
|
||||||
|
|
||||||
public class PollServiceEventArgs : EventArgs
|
public class PollServiceEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,7 +130,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
foreach (object o in m_requests)
|
foreach (object o in m_requests)
|
||||||
{
|
{
|
||||||
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
|
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
|
||||||
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
|
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.PollServiceArgs.Id), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_requests.Clear();
|
m_requests.Clear();
|
||||||
|
|
|
@ -112,7 +112,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
if ((Environment.TickCount - req.RequestTime) > m_timeout)
|
if ((Environment.TickCount - req.RequestTime) > m_timeout)
|
||||||
{
|
{
|
||||||
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(),
|
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.PollServiceArgs.Id),
|
||||||
new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext));
|
new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -350,7 +350,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
lock (queue)
|
lock (queue)
|
||||||
{
|
{
|
||||||
if (queue.Count == 0)
|
if (queue.Count == 0)
|
||||||
return NoEvents();
|
return NoEvents(pAgentId);
|
||||||
element = queue.Dequeue(); // 15s timeout
|
element = queue.Dequeue(); // 15s timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Hashtable NoEvents()
|
public Hashtable NoEvents(UUID agentID)
|
||||||
{
|
{
|
||||||
Hashtable responsedata = new Hashtable();
|
Hashtable responsedata = new Hashtable();
|
||||||
responsedata["int_response_code"] = 502;
|
responsedata["int_response_code"] = 502;
|
||||||
|
|
Loading…
Reference in New Issue