From 217d511077cba75e48957bcbb0a0da8344fa8f4c Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 15 Aug 2007 15:24:37 +0000 Subject: Temporary fix for the region crossing crash, Although we need to start to change and improve how we handle caps. --- OpenSim/Framework/General/Util.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/General/Util.cs') diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs index f3a8c73..5eae206 100644 --- a/OpenSim/Framework/General/Util.cs +++ b/OpenSim/Framework/General/Util.cs @@ -26,6 +26,7 @@ * */ using System; +using System.Collections.Generic; using System.IO; using System.Security.Cryptography; using System.Net; @@ -41,6 +42,7 @@ namespace OpenSim.Framework.Utilities private static Random randomClass = new Random(); private static uint nextXferID = 5000; private static object XferLock = new object(); + private static Dictionary capsURLS = new Dictionary(); public static ulong UIntsToLong(uint X, uint Y) { @@ -66,6 +68,11 @@ namespace OpenSim.Framework.Utilities return id; } + public Util() + { + + } + public static string GetFileName(string file) { // Return just the filename on UNIX platforms @@ -311,9 +318,25 @@ namespace OpenSim.Framework.Utilities return temp; } - public Util() + public static string GetCapsURL(LLUUID userID) { + if (capsURLS.ContainsKey(userID)) + { + return capsURLS[userID]; + } + return ""; + } + public static void SetCapsURL(LLUUID userID, string url) + { + if (capsURLS.ContainsKey(userID)) + { + capsURLS[userID] = url; + } + else + { + capsURLS.Add(userID, url); + } } // Nini (config) related Methods -- cgit v1.1