* Run SimianGrid session updates asynchronously instead of from the main heartbeat thread
* Minor dead code cleanupviewer-2-initial-appearance
parent
8415b98806
commit
9609faa8eb
|
@ -26,11 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
|
@ -107,7 +105,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID)
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.IO;
|
|
||||||
using System.Net;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
|
@ -37,7 +35,6 @@ using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Server.Base;
|
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
|
@ -30,13 +30,10 @@ using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
|
using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
|
||||||
|
|
|
@ -37,7 +37,6 @@ using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Server.Base;
|
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Services.Connectors.SimianGrid
|
namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
|
@ -28,17 +28,14 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Net;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Server.Base;
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
|
@ -358,25 +355,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
return null;
|
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<PresenceInfo> GetSessions(UUID userID)
|
private List<PresenceInfo> GetSessions(UUID userID)
|
||||||
{
|
{
|
||||||
List<PresenceInfo> presences = new List<PresenceInfo>(1);
|
List<PresenceInfo> presences = new List<PresenceInfo>(1);
|
||||||
|
@ -429,39 +407,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// Fetch the last known avatar location with GetSession and persist it
|
|
||||||
///// as user data with AddUserData
|
|
||||||
///// </summary>
|
|
||||||
//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)
|
private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse)
|
||||||
{
|
{
|
||||||
if (sessionResponse == null)
|
if (sessionResponse == null)
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
Loading…
Reference in New Issue