From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Services/PresenceService/PresenceService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services/PresenceService/PresenceService.cs') diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index b5ca4d5..ae92919 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs @@ -71,7 +71,7 @@ namespace OpenSim.Services.PresenceService data.SessionID = sessionID; data.Data = new Dictionary(); data.Data["SecureSessionID"] = secureSessionID.ToString(); - + m_Database.Store(data); string prevUserStr = ""; @@ -80,7 +80,7 @@ namespace OpenSim.Services.PresenceService m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); - + return true; } @@ -88,11 +88,11 @@ namespace OpenSim.Services.PresenceService { PresenceInfo presence = GetAgent(sessionID); - m_log.InfoFormat("[PRESENCE SERVICE]: LogoutAgent: session {0}, user {1}, region {2}", + m_log.DebugFormat("[PRESENCE SERVICE]: LogoutAgent: session {0}, user {1}, region {2}", sessionID, (presence == null) ? null : presence.UserID, (presence == null) ? null : presence.RegionID.ToString()); - + return m_Database.Delete("SessionID", sessionID.ToString()); } @@ -144,7 +144,7 @@ namespace OpenSim.Services.PresenceService public PresenceInfo GetAgent(UUID sessionID) { PresenceInfo ret = new PresenceInfo(); - + PresenceData data = m_Database.Get(sessionID); if (data == null) return null; -- cgit v1.1 From 66d7ba733f296f81398a040f05dd945c2facb2b4 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 22:25:06 +1000 Subject: Various logging fix ups. Mostly removing console spam. Default to INFO on the console and DEBUG in the log files. More time stamp resolution. --- OpenSim/Services/PresenceService/PresenceService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/PresenceService/PresenceService.cs') diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index ae92919..0392409 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs @@ -88,7 +88,7 @@ namespace OpenSim.Services.PresenceService { PresenceInfo presence = GetAgent(sessionID); - m_log.DebugFormat("[PRESENCE SERVICE]: LogoutAgent: session {0}, user {1}, region {2}", + m_log.InfoFormat("[PRESENCE SERVICE]: LogoutAgent: session {0}, user {1}, region {2}", sessionID, (presence == null) ? null : presence.UserID, (presence == null) ? null : presence.RegionID.ToString()); -- cgit v1.1 From 7aecb3c7d9262b7dcd43b45736bb008a2f1ca742 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 15 Aug 2019 02:18:35 +1000 Subject: Bandaid for ghost users, check and remove them from Presence when they log on. Once again OOP proves it's worse that spaghetti, but cutting up the spaghetti and hiding it all over the kitchen. Note the commented out bits from GateKeeperService.cs, this stuff is checked TWICE, though this time is for HGers, or not. --- OpenSim/Services/PresenceService/PresenceService.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Services/PresenceService/PresenceService.cs') diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 0392409..1059b2b 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs @@ -151,6 +151,22 @@ namespace OpenSim.Services.PresenceService ret.UserID = data.UserID; ret.RegionID = data.RegionID; + ret.SessionID = data.SessionID; + + return ret; + } + + public PresenceInfo GetAgentByUser(UUID userID) + { + PresenceInfo ret = new PresenceInfo(); + + PresenceData data = m_Database.GetByUser(userID); + if (data == null) + return null; + + ret.UserID = data.UserID; + ret.RegionID = data.RegionID; + ret.SessionID = data.SessionID; return ret; } @@ -169,6 +185,7 @@ namespace OpenSim.Services.PresenceService ret.UserID = d.UserID; ret.RegionID = d.RegionID; + ret.SessionID = d.SessionID; info.Add(ret); } -- cgit v1.1