aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorMelanie2010-09-30 16:01:45 +0100
committerMelanie2010-09-30 16:01:45 +0100
commit521e2c83558d77c0482bebb6764a22c1fb8c5fd9 (patch)
treeb58fdcab0d9ac8c9056413f005144384da1686a3 /OpenSim/Services/Connectors
parentFix an inventory fetch issue (diff)
parentPrevent dropping someone else's attachments (diff)
downloadopensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.zip
opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.gz
opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.bz2
opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs14
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs14
3 files changed, 14 insertions, 18 deletions
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
index 935ebb1..b3ea865 100644
--- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
+++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors
101 101
102 } 102 }
103 103
104 public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat) 104 public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat)
105 { 105 {
106 Dictionary<string, object> sendData = new Dictionary<string, object>(); 106 Dictionary<string, object> sendData = new Dictionary<string, object>();
107 //sendData["SCOPEID"] = scopeID.ToString(); 107 //sendData["SCOPEID"] = scopeID.ToString();
@@ -123,7 +123,7 @@ namespace OpenSim.Services.Connectors
123 return Set(sendData, userID, regionID, position, lookAt); 123 return Set(sendData, userID, regionID, position, lookAt);
124 } 124 }
125 125
126 public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt) 126 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
127 { 127 {
128 Dictionary<string, object> sendData = new Dictionary<string, object>(); 128 Dictionary<string, object> sendData = new Dictionary<string, object>();
129 //sendData["SCOPEID"] = scopeID.ToString(); 129 //sendData["SCOPEID"] = scopeID.ToString();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
index 67a06f3..b8703c6 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
@@ -29,6 +29,7 @@ using System;
29using System.Reflection; 29using System.Reflection;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Framework.Scenes; 31using OpenSim.Region.Framework.Scenes;
32using OpenSim.Services.Interfaces;
32using OpenMetaverse; 33using OpenMetaverse;
33using log4net; 34using log4net;
34 35
@@ -38,12 +39,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
38 { 39 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 41
41 private SimianPresenceServiceConnector m_GridUserService; 42 private IGridUserService m_GridUserService;
42 private Scene m_aScene;
43 43
44 public SimianActivityDetector(SimianPresenceServiceConnector guservice) 44 public SimianActivityDetector(IGridUserService guService)
45 { 45 {
46 m_GridUserService = guservice; 46 m_GridUserService = guService;
47 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started"); 47 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started");
48 } 48 }
49 49
@@ -54,9 +54,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
54 scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; 54 scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
55 scene.EventManager.OnNewClient += OnNewClient; 55 scene.EventManager.OnNewClient += OnNewClient;
56 scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel; 56 scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel;
57
58 if (m_aScene == null)
59 m_aScene = scene;
60 } 57 }
61 58
62 public void RemoveRegion(Scene scene) 59 public void RemoveRegion(Scene scene)
@@ -101,9 +98,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
101 } 98 }
102 99
103 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); 100 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
104 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); 101 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
105 } 102 }
106
107 } 103 }
108 104
109 void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) 105 void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID)
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index a344594..8141420 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -260,8 +260,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
260 return null; 260 return null;
261 } 261 }
262 262
263 public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 263 public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
264 { 264 {
265 m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Logging out user " + userID);
266
267 // Remove the session to mark this user offline
268 if (!LogoutAgent(sessionID))
269 return false;
270
265 // Save our last position as user data 271 // Save our last position as user data
266 NameValueCollection requestArgs = new NameValueCollection 272 NameValueCollection requestArgs = new NameValueCollection
267 { 273 {
@@ -304,12 +310,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
304 return UpdateSession(sessionID, regionID, lastPosition, lastLookAt); 310 return UpdateSession(sessionID, regionID, lastPosition, lastLookAt);
305 } 311 }
306 312
307 public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
308 {
309 // Never called
310 return false;
311 }
312
313 public GridUserInfo GetGridUserInfo(string user) 313 public GridUserInfo GetGridUserInfo(string user)
314 { 314 {
315 m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); 315 m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);