From e984bfb4c63718d5176b17f6beea46f4512cf304 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 14:31:39 -0700 Subject: This should have a strong effect on the Unknown User issue mantis #6625 --- OpenSim/Services/UserAccountService/GridUserService.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 8388180..62b82fe 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -51,7 +51,22 @@ namespace OpenSim.Services.UserAccountService public virtual GridUserInfo GetGridUserInfo(string userID) { - GridUserData d = m_Database.Get(userID); + GridUserData d = null; + if (userID.Length > 36) // it's a UUI + d = m_Database.Get(userID); + else // it's a UUID + { + GridUserData[] ds = m_Database.GetAll(userID); + if (ds == null) + 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; + } + } if (d == null) return null; -- cgit v1.1 From 626940ceb83102a6aa0eebb81e10c86f1feb8eff Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:39:10 -0700 Subject: More debug messages --- OpenSim/Services/UserAccountService/GridUserService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 62b82fe..af2701d 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -46,7 +46,7 @@ namespace OpenSim.Services.UserAccountService public GridUserService(IConfigSource config) : base(config) { - m_log.Debug("[USER GRID SERVICE]: Starting user grid service"); + m_log.Debug("[GRID USER SERVICE]: Starting user grid service"); } public virtual GridUserInfo GetGridUserInfo(string userID) @@ -58,13 +58,17 @@ 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 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 --- OpenSim/Services/UserAccountService/GridUserService.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/Services') 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 From 27cdfb7b840423cf8cee08988dc487eeb34d71c7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 08:47:45 -0700 Subject: HG Friends: debug an issue where the friends data stored in the DB is incomplete. --- OpenSim/Services/Friends/FriendsService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Friends/FriendsService.cs b/OpenSim/Services/Friends/FriendsService.cs index e2033ac..dd3f733 100644 --- a/OpenSim/Services/Friends/FriendsService.cs +++ b/OpenSim/Services/Friends/FriendsService.cs @@ -29,6 +29,7 @@ using OpenMetaverse; using OpenSim.Framework; using System; using System.Collections.Generic; +using System.Reflection; using OpenSim.Services.Interfaces; using OpenSim.Data; using Nini.Config; @@ -39,7 +40,12 @@ namespace OpenSim.Services.Friends { public class FriendsService : FriendsServiceBase, IFriendsService { - public FriendsService(IConfigSource config) : base(config) + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + public FriendsService(IConfigSource config) + : base(config) { } @@ -98,6 +104,7 @@ namespace OpenSim.Services.Friends d.Data = new Dictionary(); d.Data["Flags"] = flags.ToString(); + m_log.DebugFormat("[FRIENDS]: Storing {0} {1}", PrincipalID, Friend); return m_Database.Store(d); } -- cgit v1.1 From 5eb78aad96f2dbaf7c4c0e5fa7e678076a2edbfc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 09:17:01 -0700 Subject: Revert "HG Friends: debug an issue where the friends data stored in the DB is incomplete." This reverts commit 27cdfb7b840423cf8cee08988dc487eeb34d71c7. --- OpenSim/Services/Friends/FriendsService.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Friends/FriendsService.cs b/OpenSim/Services/Friends/FriendsService.cs index dd3f733..e2033ac 100644 --- a/OpenSim/Services/Friends/FriendsService.cs +++ b/OpenSim/Services/Friends/FriendsService.cs @@ -29,7 +29,6 @@ using OpenMetaverse; using OpenSim.Framework; using System; using System.Collections.Generic; -using System.Reflection; using OpenSim.Services.Interfaces; using OpenSim.Data; using Nini.Config; @@ -40,12 +39,7 @@ namespace OpenSim.Services.Friends { public class FriendsService : FriendsServiceBase, IFriendsService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); - - public FriendsService(IConfigSource config) - : base(config) + public FriendsService(IConfigSource config) : base(config) { } @@ -104,7 +98,6 @@ namespace OpenSim.Services.Friends d.Data = new Dictionary(); d.Data["Flags"] = flags.ToString(); - m_log.DebugFormat("[FRIENDS]: Storing {0} {1}", PrincipalID, Friend); return m_Database.Store(d); } -- cgit v1.1