Add support for simple external CAPS texture services

avinationmerge
root 2013-09-07 17:57:02 +02:00
parent f7378829c3
commit 823e8b5d19
1 changed files with 31 additions and 19 deletions

View File

@ -77,6 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden
private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>();
private static Thread[] m_workerThreads = null;
private string m_Url = "localhost";
private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue =
new OpenMetaverse.BlockingQueue<aPollRequest>();
@ -86,6 +88,9 @@ namespace OpenSim.Region.ClientStack.Linden
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs["ClientStack.LindenCaps"];
if (config != null)
m_Url = config.GetString("Cap_GetTexture", "localhost");
}
public void AddRegion(Scene s)
@ -342,6 +347,8 @@ namespace OpenSim.Region.ClientStack.Linden
}
private void RegisterCaps(UUID agentID, Caps caps)
{
if (m_Url == "localhost")
{
string capUrl = "/CAPS/" + UUID.Random() + "/";
@ -365,6 +372,11 @@ namespace OpenSim.Region.ClientStack.Linden
m_pollservices[agentID] = args;
m_capsDict[agentID] = capUrl;
}
else
{
caps.RegisterHandler("GetTexture", m_Url);
}
}
private void DeregisterCaps(UUID agentID, Caps caps)
{