From 4d24bf75fd695a12683987d9803018c2ec4cae60 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 16:46:35 -0700 Subject: Deleted debug messages. Fixed a null ref exception on the POST handler of GridUserServerPostHandler.cs --- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 5 ++--- OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 6 ++++-- OpenSim/Services/UserAccountService/GridUserService.cs | 5 +---- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index ff31b67..90af82e 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -323,7 +323,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement GridUserInfo uInfo = m_Scenes[0].GridUserService.GetGridUserInfo(uuid.ToString()); if (uInfo != null) { - m_log.DebugFormat("[USER MANAGEMENT MODULE]: Found grid user {0}", uInfo.UserID); string url, first, last, tmp; UUID u; if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) @@ -336,10 +335,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement return true; } else - m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI"); + m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI {0}", uInfo.UserID); } else - m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found"); + m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found {0}", uuid); names[0] = "Unknown"; names[1] = "UserUMMTGUN6"; diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 687cf8d..7483395 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs @@ -185,10 +185,12 @@ namespace OpenSim.Server.Handlers.GridUser GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(user); Dictionary result = new Dictionary(); - result["result"] = guinfo.ToKeyValuePairs(); + if (guinfo != null) + result["result"] = guinfo.ToKeyValuePairs(); + else + result["result"] = "null"; string xmlString = ServerUtils.BuildXmlResponse(result); - //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); return Util.UTF8NoBomEncoding.GetBytes(xmlString); } diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index af2701d..fa9a4a8 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -58,17 +58,14 @@ namespace OpenSim.Services.UserAccountService { GridUserData[] ds = m_Database.GetAll(userID); if (ds == null) - { - m_log.DebugFormat("[GRID USER SERVICE]: user not found {0}", userID); return null; - } + if (ds.Length > 0) { d = ds[0]; foreach (GridUserData dd in ds) if (dd.UserID.Length > d.UserID.Length) // find the longest d = dd; - m_log.DebugFormat("[GRID USER SERVICE]: Found user {0}", d.UserID); } } -- cgit v1.1