From 8c0b9080a4fb013d559966fc8c8175fb16162c2d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 18 Feb 2013 21:09:14 +0100 Subject: Fix an issue where the viewer would request the seed cap before there was a handler for it. --- OpenSim/Capabilities/Caps.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Capabilities') diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index bc6f6f9..241fef3 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; +using System.Threading; using log4net; using Nini.Config; using OpenMetaverse; @@ -68,6 +69,7 @@ namespace OpenSim.Framework.Capabilities private IHttpServer m_httpListener; private UUID m_agentID; private string m_regionName; + private ManualResetEvent m_capsActive = new ManualResetEvent(false); public UUID AgentID { @@ -171,5 +173,16 @@ namespace OpenSim.Framework.Capabilities } } } + + public void Activate() + { + m_capsActive.Set(); + } + + public bool WaitForActivation() + { + // Wait for 30s. If that elapses, return false and run without caps + return m_capsActive.WaitOne(30000); + } } } -- cgit v1.1