diff options
Diffstat (limited to 'OpenSim/Framework/Communications/OspResolver.cs')
-rw-r--r-- | OpenSim/Framework/Communications/OspResolver.cs | 15 |
1 files changed, 13 insertions, 2 deletions
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 | |||
47 | public const string OSPA_NAME_VALUE_SEPARATOR = " "; | 47 | public const string OSPA_NAME_VALUE_SEPARATOR = " "; |
48 | public const string OSPA_TUPLE_SEPARATOR = "|"; | 48 | public const string OSPA_TUPLE_SEPARATOR = "|"; |
49 | public static readonly char[] OSPA_TUPLE_SEPARATOR_ARRAY = OSPA_TUPLE_SEPARATOR.ToCharArray(); | 49 | public static readonly char[] OSPA_TUPLE_SEPARATOR_ARRAY = OSPA_TUPLE_SEPARATOR.ToCharArray(); |
50 | public const string OSPA_KEY_VALUE_PAIR_SEPARATOR = "="; | 50 | public const string OSPA_PAIR_SEPARATOR = "="; |
51 | |||
52 | /// <summary> | ||
53 | /// Make an OSPA given an avatar name | ||
54 | /// </summary> | ||
55 | /// <param name="name"></param> | ||
56 | /// <returns></returns> | ||
57 | public static string MakeOspa(string firstName, string lastName) | ||
58 | { | ||
59 | return | ||
60 | OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; | ||
61 | } | ||
51 | 62 | ||
52 | /// <summary> | 63 | /// <summary> |
53 | /// Resolve an osp string into the most suitable internal OpenSim identifier. | 64 | /// Resolve an osp string into the most suitable internal OpenSim identifier. |
@@ -73,7 +84,7 @@ namespace OpenSim.Framework.Communications | |||
73 | 84 | ||
74 | foreach (string tuple in ospaTuples) | 85 | foreach (string tuple in ospaTuples) |
75 | { | 86 | { |
76 | int tupleSeparatorIndex = tuple.IndexOf(OSPA_TUPLE_SEPARATOR); | 87 | int tupleSeparatorIndex = tuple.IndexOf(OSPA_PAIR_SEPARATOR); |
77 | 88 | ||
78 | if (tupleSeparatorIndex < 0) | 89 | if (tupleSeparatorIndex < 0) |
79 | { | 90 | { |