From c56f928c804de01f523b23c519ada63475961f1c Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 29 Apr 2009 17:46:13 +0000
Subject: * Adjust load iar unit test to check load of items with creator names
 that exist in the system but which are not the loading user

---
 OpenSim/Framework/Communications/OspResolver.cs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Framework/Communications/OspResolver.cs')

diff --git a/OpenSim/Framework/Communications/OspResolver.cs b/OpenSim/Framework/Communications/OspResolver.cs
index 708bb84..f246692 100644
--- a/OpenSim/Framework/Communications/OspResolver.cs
+++ b/OpenSim/Framework/Communications/OspResolver.cs
@@ -47,7 +47,18 @@ namespace OpenSim.Framework.Communications
         public const string OSPA_NAME_VALUE_SEPARATOR = " ";
         public const string OSPA_TUPLE_SEPARATOR = "|";
         public static readonly char[] OSPA_TUPLE_SEPARATOR_ARRAY = OSPA_TUPLE_SEPARATOR.ToCharArray();
-        public const string OSPA_KEY_VALUE_PAIR_SEPARATOR = "=";
+        public const string OSPA_PAIR_SEPARATOR = "=";
+
+        /// <summary>
+        /// Make an OSPA given an avatar name
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static string MakeOspa(string firstName, string lastName)
+        {
+            return 
+                OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName;
+        }
         
         /// <summary>
         /// Resolve an osp string into the most suitable internal OpenSim identifier.
@@ -73,7 +84,7 @@ namespace OpenSim.Framework.Communications
             
             foreach (string tuple in ospaTuples)
             {
-                int tupleSeparatorIndex = tuple.IndexOf(OSPA_TUPLE_SEPARATOR);
+                int tupleSeparatorIndex = tuple.IndexOf(OSPA_PAIR_SEPARATOR);
 
                 if (tupleSeparatorIndex < 0)
                 {
-- 
cgit v1.1