diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs index 043bba5baf..936605c146 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs @@ -48,18 +48,6 @@ namespace OpenSim.Framework.Servers.HttpServer public DropMethod Drop; public UUID Id; public int TimeOutms; - //public EventType Type; - - public enum EventType : int - { - Poll = 0, - LslHttp = 1, - Inventory = 2, - Texture = 3, - Mesh = 4, - Mesh2 = 5, - Asset = 6 - } public string Url { get; set; } @@ -87,7 +75,6 @@ namespace OpenSim.Framework.Servers.HttpServer Drop = pDrop; Id = pId; TimeOutms = pTimeOutms; - //Type = EventType.Poll; } } } diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index 41583f1995..e1c2bb2725 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs @@ -177,10 +177,10 @@ namespace OpenSim.Framework.Servers.HttpServer if(buffer == null) { - if (!(contentType.Contains("image") + if (contentType != null && (!(contentType.Contains("image") || contentType.Contains("x-shockwave-flash") || contentType.Contains("application/x-oar") - || contentType.Contains("application/vnd.ll.mesh"))) + || contentType.Contains("application/vnd.ll.mesh")))) { // Text buffer = Encoding.UTF8.GetBytes(responseString); diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 4672a45528..88e49acc47 100755 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -50,25 +50,11 @@ namespace OpenSim.Framework.Servers.HttpServer private bool m_running = false; - //private SmartThreadPool m_threadPool; - public PollServiceRequestManager( bool performResponsesAsync, uint pWorkerThreadCount, int pTimeout) { m_WorkerThreadCount = pWorkerThreadCount; m_workerThreads = new Thread[m_WorkerThreadCount]; - - /* - STPStartInfo startInfo = new STPStartInfo(); - startInfo.IdleTimeout = 30000; - startInfo.MaxWorkerThreads = 20; - startInfo.MinWorkerThreads = 1; - startInfo.ThreadPriority = ThreadPriority.Normal; - startInfo.StartSuspended = true; - startInfo.ThreadPoolName = "PoolService"; - - m_threadPool = new SmartThreadPool(startInfo); - */ } public void Start() @@ -76,7 +62,6 @@ namespace OpenSim.Framework.Servers.HttpServer if(m_running) return; m_running = true; - //m_threadPool.Start(); //startup worker threads for (uint i = 0; i < m_WorkerThreadCount; i++) { @@ -137,10 +122,6 @@ namespace OpenSim.Framework.Servers.HttpServer foreach (Thread t in m_workerThreads) Watchdog.AbortThread(t.ManagedThreadId); - //m_threadPool.Shutdown(); - - // any entry in m_bycontext should have a active request on the other queues - // so just delete contents to easy GC PollServiceHttpRequest req; try { @@ -199,40 +180,22 @@ namespace OpenSim.Framework.Servers.HttpServer if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) { - PollServiceHttpRequest nreq = req; - //m_threadPool.QueueWorkItem(x => - //{ - try - { - Hashtable responsedata = nreq.PollServiceArgs.GetEvents(nreq.RequestID, nreq.PollServiceArgs.Id); - nreq.DoHTTPGruntWork(responsedata); - } - catch (ObjectDisposedException) { } - finally - { - nreq = null; - } - //return null; - //}, null); + try + { + Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id); + req.DoHTTPGruntWork(responsedata); + } + catch (ObjectDisposedException) { } } else { if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) { - PollServiceHttpRequest nreq = req; - //m_threadPool.QueueWorkItem(x => - //{ - try - { - nreq.DoHTTPGruntWork(nreq.PollServiceArgs.NoEvents(nreq.RequestID, nreq.PollServiceArgs.Id)); - } - catch (ObjectDisposedException) { } - finally - { - nreq = null; - } - //return null; - //}, null); + try + { + req.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id)); + } + catch (ObjectDisposedException) { } } else { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index 8da9864dbc..1d465aec2c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs @@ -57,7 +57,7 @@ namespace OpenSim.Region.ClientStack.Linden private Commands m_commands = new Commands(); public ICommands Commands { get { return m_commands; } } - ConcurrentDictionary currentConsoles = new ConcurrentDictionary(); + ConcurrentDictionary currentConsoles = new ConcurrentDictionary(); public event ConsoleMessage OnConsoleMessage; @@ -101,7 +101,6 @@ namespace OpenSim.Region.ClientStack.Linden { //if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID) && !m_scene.Permissions.IsGod(agentID)) // return; - //m_log.DebugFormat("[REGION CONSOLE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); caps.RegisterSimpleHandler("SimConsoleAsync", new ConsoleHandler("/" + UUID.Random(), "SimConsoleAsync", agentID, this, m_scene)); } @@ -125,14 +124,9 @@ namespace OpenSim.Region.ClientStack.Linden RemoveConsole(agentID); return; } - OSD osd = OSD.FromString(message); - m_eventQueue.Enqueue(EventQueueHelper.BuildEvent("SimConsoleResponse", osd), agentID); - - ConsoleMessage handlerConsoleMessage = OnConsoleMessage; - - if (handlerConsoleMessage != null) - handlerConsoleMessage( agentID, message); + m_eventQueue.Enqueue(m_eventQueue.BuildEvent("SimConsoleResponse", OSD.FromString(message)), agentID); + OnConsoleMessage?.Invoke( agentID, message); } public bool RunCommand(string command, UUID invokerID) diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs index 8fef57a161..a54ec65739 100755 --- a/OpenSim/Services/HypergridService/HGAssetService.cs +++ b/OpenSim/Services/HypergridService/HGAssetService.cs @@ -104,9 +104,6 @@ namespace OpenSim.Services.HypergridService m_log.ErrorFormat("[HGASSETS]: Failed to load backing service {0}", str); } } - - - } #region IAssetService