Removed sessionID from GridUserservice again. Removed parcel crossing detection from Robust connector. Fixed Simian to continue to send those location updates upon parcel crossing, without changing the interface.

soprefactor
Diva Canto 2010-05-20 15:14:14 -07:00
parent beed74096c
commit 13c22015e5
9 changed files with 18 additions and 21 deletions

View File

@ -56,7 +56,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
// But we could trigger the position update more often // But we could trigger the position update more often
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel;
if (m_aScene == null) if (m_aScene == null)
m_aScene = scene; m_aScene = scene;
@ -72,7 +71,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
{ {
m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
} }
public void OnNewClient(IClientAPI client) public void OnNewClient(IClientAPI client)
@ -105,12 +104,5 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
} }
void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID)
{
// TODO: grab the parcel ID from ILandModule
// and send that along
m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
}
} }
} }

View File

@ -162,9 +162,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt); return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt);
} }
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
{ {
return m_GridUserService.SetLastPosition(userID, sessionID, regionID, lastPosition, lastLookAt); return m_GridUserService.SetLastPosition(userID, regionID, lastPosition, lastLookAt);
} }
public GridUserInfo GetGridUserInfo(string userID) public GridUserInfo GetGridUserInfo(string userID)

View File

@ -137,9 +137,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
return m_RemoteConnector.SetHome(userID, regionID, position, lookAt); return m_RemoteConnector.SetHome(userID, regionID, position, lookAt);
} }
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt) public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt)
{ {
return m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt); return m_RemoteConnector.SetLastPosition(userID, regionID, position, lookAt);
} }
public GridUserInfo GetGridUserInfo(string userID) public GridUserInfo GetGridUserInfo(string userID)

View File

@ -156,7 +156,6 @@ namespace OpenSim.Server.Handlers.GridUser
byte[] SetPosition(Dictionary<string, object> request) byte[] SetPosition(Dictionary<string, object> request)
{ {
string user = string.Empty; string user = string.Empty;
UUID sessionID = UUID.Zero;
UUID region = UUID.Zero; UUID region = UUID.Zero;
Vector3 position = new Vector3(128, 128, 70); Vector3 position = new Vector3(128, 128, 70);
Vector3 look = Vector3.Zero; Vector3 look = Vector3.Zero;
@ -167,7 +166,7 @@ namespace OpenSim.Server.Handlers.GridUser
if (!UnpackArgs(request, out user, out region, out position, out look)) if (!UnpackArgs(request, out user, out region, out position, out look))
return FailureResult(); return FailureResult();
if (m_GridUserService.SetLastPosition(user, sessionID, region, position, look)) if (m_GridUserService.SetLastPosition(user, region, position, look))
return SuccessResult(); return SuccessResult();
return FailureResult(); return FailureResult();

View File

@ -84,7 +84,7 @@ namespace OpenSim.Services.Connectors
} }
#region IPresenceService #region IGridUserService
public GridUserInfo LoggedIn(string userID) public GridUserInfo LoggedIn(string userID)
@ -123,7 +123,7 @@ namespace OpenSim.Services.Connectors
return Set(sendData, userID, regionID, position, lookAt); return Set(sendData, userID, regionID, position, lookAt);
} }
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt) public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt)
{ {
Dictionary<string, object> sendData = new Dictionary<string, object>(); Dictionary<string, object> sendData = new Dictionary<string, object>();
//sendData["SCOPEID"] = scopeID.ToString(); //sendData["SCOPEID"] = scopeID.ToString();

View File

@ -40,10 +40,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IGridUserService m_GridUserService; private SimianPresenceServiceConnector m_GridUserService;
private Scene m_aScene; private Scene m_aScene;
public SimianActivityDetector(IGridUserService guservice) public SimianActivityDetector(SimianPresenceServiceConnector guservice)
{ {
m_GridUserService = guservice; m_GridUserService = guservice;
m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started"); m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started");

View File

@ -298,6 +298,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
return UpdateSession(sessionID, regionID, lastPosition, lastLookAt); return UpdateSession(sessionID, regionID, lastPosition, lastLookAt);
} }
public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
{
// Never called
return false;
}
public GridUserInfo GetGridUserInfo(string user) public GridUserInfo GetGridUserInfo(string user)
{ {
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);

View File

@ -108,7 +108,7 @@ namespace OpenSim.Services.Interfaces
bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
GridUserInfo GetGridUserInfo(string userID); GridUserInfo GetGridUserInfo(string userID);
} }

View File

@ -139,7 +139,7 @@ namespace OpenSim.Services.UserAccountService
return m_Database.Store(d); return m_Database.Store(d);
} }
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
{ {
//m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID); //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID);
GridUserData d = m_Database.Get(userID); GridUserData d = m_Database.Get(userID);