diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs index a871d07f16..67b73f39de 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs @@ -26,11 +26,9 @@ */ using System; -using System.Collections.Generic; using System.Reflection; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; -using OpenSim.Services.Interfaces; using OpenMetaverse; using log4net; @@ -107,7 +105,11 @@ namespace OpenSim.Services.Connectors.SimianGrid void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) { - m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); + // Asynchronously update the position stored in the session table for this agent + Util.FireAndForget(delegate(object o) + { + m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); + }); } } } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 3505c640a0..4d0d53ec0b 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs @@ -28,8 +28,6 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.IO; -using System.Net; using System.Reflection; using log4net; using Mono.Addins; @@ -37,7 +35,6 @@ using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Server.Base; using OpenSim.Services.Interfaces; using OpenMetaverse; using OpenMetaverse.StructuredData; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 5b18aeff3c..6f2d73559b 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs @@ -30,13 +30,10 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Reflection; using log4net; -using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 3953369e5f..21ad4abd9a 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -37,7 +37,6 @@ using OpenMetaverse.StructuredData; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Server.Base; using OpenSim.Services.Interfaces; namespace OpenSim.Services.Connectors.SimianGrid diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 077be3c31a..a344594a1d 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -28,17 +28,14 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.Net; using System.Reflection; using log4net; using Mono.Addins; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; -using OpenSim.Server.Base; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -358,25 +355,6 @@ namespace OpenSim.Services.Connectors.SimianGrid return null; } -// private OSDMap GetSessionData(UUID sessionID) -// { -// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); -// -// NameValueCollection requestArgs = new NameValueCollection -// { -// { "RequestMethod", "GetSession" }, -// { "SessionID", sessionID.ToString() } -// }; -// -// OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); -// if (response["Success"].AsBoolean()) -// return response; -// else -// m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); -// -// return null; -// } - private List GetSessions(UUID userID) { List presences = new List(1); @@ -429,39 +407,6 @@ namespace OpenSim.Services.Connectors.SimianGrid return success; } - ///// - ///// Fetch the last known avatar location with GetSession and persist it - ///// as user data with AddUserData - ///// - //private bool SetLastLocation(UUID sessionID) - //{ - // NameValueCollection requestArgs = new NameValueCollection - // { - // { "RequestMethod", "GetSession" }, - // { "SessionID", sessionID.ToString() } - // }; - - // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); - // bool success = response["Success"].AsBoolean(); - - // if (success) - // { - // UUID userID = response["UserID"].AsUUID(); - // UUID sceneID = response["SceneID"].AsUUID(); - // Vector3 position = response["ScenePosition"].AsVector3(); - // Vector3 lookAt = response["SceneLookAt"].AsVector3(); - - // return SetLastLocation(userID, sceneID, position, lookAt); - // } - // else - // { - // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve presence information for session " + sessionID + - // " while saving last location: " + response["Message"].AsString()); - // } - - // return success; - //} - private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) { if (sessionResponse == null) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 1ac9882c24..ddd232286f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -28,7 +28,6 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.IO; using System.Reflection; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces;