From e7d9fe966cf501d77370fa45639e40ac2f3f6ab7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 20 Oct 2018 14:00:13 +0100 Subject: fix groups v2 agentUUI ofr uuid.zero case --- .../Hypergrid/GroupsServiceHGConnectorModule.cs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index 9852581..a1093c9 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -605,14 +605,8 @@ namespace OpenSim.Groups private string AgentUUI(string AgentIDStr) { UUID AgentID = UUID.Zero; - try - { - AgentID = new UUID(AgentIDStr); - } - catch (FormatException) - { - return AgentID.ToString(); - } + if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero) + return UUID.Zero.ToString(); if (m_UserManagement.IsLocalGridUser(AgentID)) return AgentID.ToString(); @@ -636,14 +630,8 @@ namespace OpenSim.Groups private string AgentUUIForOutside(string AgentIDStr) { UUID AgentID = UUID.Zero; - try - { - AgentID = new UUID(AgentIDStr); - } - catch (FormatException) - { - return AgentID.ToString(); - } + if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero) + return UUID.Zero.ToString(); AgentCircuitData agent = null; foreach (Scene scene in m_Scenes) -- cgit v1.1