aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-09-30 16:01:45 +0100
committerMelanie2010-09-30 16:01:45 +0100
commit521e2c83558d77c0482bebb6764a22c1fb8c5fd9 (patch)
treeb58fdcab0d9ac8c9056413f005144384da1686a3 /OpenSim
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 '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs9
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs14
-rw-r--r--OpenSim/Region/Framework/Interfaces/IBuySellModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs4
-rw-r--r--OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs4
-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
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs2
-rw-r--r--OpenSim/Services/Interfaces/IGridUserService.cs26
-rw-r--r--OpenSim/Services/UserAccountService/GridUserService.cs4
14 files changed, 72 insertions, 46 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 6f7256e..9807ea5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -426,6 +426,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
426 if (part == null || part.ParentGroup == null) 426 if (part == null || part.ParentGroup == null)
427 return; 427 return;
428 428
429 if (part.ParentGroup.RootPart.AttachedAvatar != remoteClient.AgentId)
430 return;
431
429 UUID inventoryID = part.ParentGroup.GetFromItemID(); 432 UUID inventoryID = part.ParentGroup.GetFromItemID();
430 433
431 ScenePresence presence; 434 ScenePresence presence;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
index 83c8eac..a64f785 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
@@ -42,7 +42,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private IGridUserService m_GridUserService; 44 private IGridUserService m_GridUserService;
45 private Scene m_aScene;
46 45
47 public ActivityDetector(IGridUserService guservice) 46 public ActivityDetector(IGridUserService guservice)
48 { 47 {
@@ -56,9 +55,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
56 // But we could trigger the position update more often 55 // But we could trigger the position update more often
57 scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; 56 scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
58 scene.EventManager.OnNewClient += OnNewClient; 57 scene.EventManager.OnNewClient += OnNewClient;
59
60 if (m_aScene == null)
61 m_aScene = scene;
62 } 58 }
63 59
64 public void RemoveRegion(Scene scene) 60 public void RemoveRegion(Scene scene)
@@ -70,8 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
70 public void OnMakeRootAgent(ScenePresence sp) 66 public void OnMakeRootAgent(ScenePresence sp)
71 { 67 {
72 m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); 68 m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
73 69 m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
74 m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
75 } 70 }
76 71
77 public void OnNewClient(IClientAPI client) 72 public void OnNewClient(IClientAPI client)
@@ -99,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
99 } 94 }
100 } 95 }
101 m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); 96 m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
102 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); 97 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
103 } 98 }
104 99
105 } 100 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs
index d914a57..985acec 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs
@@ -152,9 +152,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
152 return m_GridUserService.LoggedIn(userID); 152 return m_GridUserService.LoggedIn(userID);
153 } 153 }
154 154
155 public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 155 public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
156 { 156 {
157 return m_GridUserService.LoggedOut(userID, regionID, lastPosition, lastLookAt); 157 return m_GridUserService.LoggedOut(userID, sessionID, regionID, lastPosition, lastLookAt);
158 } 158 }
159 159
160 public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) 160 public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt)
@@ -162,9 +162,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
162 return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt); 162 return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt);
163 } 163 }
164 164
165 public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 165 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
166 { 166 {
167 return m_GridUserService.SetLastPosition(userID, regionID, lastPosition, lastLookAt); 167 return m_GridUserService.SetLastPosition(userID, sessionID, regionID, lastPosition, lastLookAt);
168 } 168 }
169 169
170 public GridUserInfo GetGridUserInfo(string userID) 170 public GridUserInfo GetGridUserInfo(string userID)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs
index e3e2e61..95b3591 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs
@@ -126,9 +126,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
126 return null; 126 return null;
127 } 127 }
128 128
129 public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat) 129 public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat)
130 { 130 {
131 return m_RemoteConnector.LoggedOut(userID, region, position, lookat); 131 return m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat);
132 } 132 }
133 133
134 134
@@ -137,9 +137,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
137 return m_RemoteConnector.SetHome(userID, regionID, position, lookAt); 137 return m_RemoteConnector.SetHome(userID, regionID, position, lookAt);
138 } 138 }
139 139
140 public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt) 140 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
141 { 141 {
142 return m_RemoteConnector.SetLastPosition(userID, regionID, position, lookAt); 142 return m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt);
143 } 143 }
144 144
145 public GridUserInfo GetGridUserInfo(string userID) 145 public GridUserInfo GetGridUserInfo(string userID)
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index c8fb9da..a674d60 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
104 part.GetProperties(client); 104 part.GetProperties(client);
105 } 105 }
106 106
107 public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) 107 public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType, int salePrice)
108 { 108 {
109 SceneObjectPart part = m_scene.GetSceneObjectPart(localID); 109 SceneObjectPart part = m_scene.GetSceneObjectPart(localID);
110 110
@@ -114,6 +114,18 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
114 if (part.ParentGroup == null) 114 if (part.ParentGroup == null)
115 return false; 115 return false;
116 116
117 if (part.ObjectSaleType != saleType)
118 {
119 m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the type of sale specified");
120 return false;
121 }
122
123 if (part.SalePrice != salePrice)
124 {
125 m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the price specified");
126 return false;
127 }
128
117 SceneObjectGroup group = part.ParentGroup; 129 SceneObjectGroup group = part.ParentGroup;
118 130
119 switch (saleType) 131 switch (saleType)
diff --git a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
index 0132bae..d1ce4c0 100644
--- a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
@@ -42,6 +42,6 @@ namespace OpenSim.Region.Framework.Interfaces
42 /// <returns> 42 /// <returns>
43 /// True on a successful purchase, false on failure 43 /// True on a successful purchase, false on failure
44 /// </returns> 44 /// </returns>
45 bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType); 45 bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType, int salePrice);
46 } 46 }
47} \ No newline at end of file 47}
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index cc51c3b..d364df6 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -814,7 +814,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
814 814
815 IBuySellModule module = s.RequestModuleInterface<IBuySellModule>(); 815 IBuySellModule module = s.RequestModuleInterface<IBuySellModule>();
816 if (module != null) 816 if (module != null)
817 module.BuyObject(remoteClient, categoryID, localID, saleType); 817 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
818 } 818 }
819 } 819 }
820 820
@@ -825,4 +825,4 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
825 Gift = 2, 825 Gift = 2,
826 Purchase = 3 826 Purchase = 3
827 } 827 }
828} \ No newline at end of file 828}
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
index f8fa429..485bc3e 100644
--- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Server.Handlers.GridUser
131 if (!UnpackArgs(request, out userID, out regionID, out position, out lookat)) 131 if (!UnpackArgs(request, out userID, out regionID, out position, out lookat))
132 return FailureResult(); 132 return FailureResult();
133 133
134 if (m_GridUserService.LoggedOut(userID, regionID, position, lookat)) 134 if (m_GridUserService.LoggedOut(userID, UUID.Zero, regionID, position, lookat))
135 return SuccessResult(); 135 return SuccessResult();
136 136
137 return FailureResult(); 137 return FailureResult();
@@ -166,7 +166,7 @@ namespace OpenSim.Server.Handlers.GridUser
166 if (!UnpackArgs(request, out user, out region, out position, out look)) 166 if (!UnpackArgs(request, out user, out region, out position, out look))
167 return FailureResult(); 167 return FailureResult();
168 168
169 if (m_GridUserService.SetLastPosition(user, region, position, look)) 169 if (m_GridUserService.SetLastPosition(user, UUID.Zero, region, position, look))
170 return SuccessResult(); 170 return SuccessResult();
171 171
172 return FailureResult(); 172 return FailureResult();
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);
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 8c3be70..8acd618 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -232,7 +232,7 @@ namespace OpenSim.Services.HypergridService
232 232
233 GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); 233 GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString());
234 if (guinfo != null) 234 if (guinfo != null)
235 m_GridUserService.LoggedOut(userID.ToString(), guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); 235 m_GridUserService.LoggedOut(userID.ToString(), sessionID, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt);
236 } 236 }
237 237
238 // We need to prevent foreign users with the same UUID as a local user 238 // We need to prevent foreign users with the same UUID as a local user
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 95ce5e8..6613ae7 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -105,11 +105,31 @@ namespace OpenSim.Services.Interfaces
105 public interface IGridUserService 105 public interface IGridUserService
106 { 106 {
107 GridUserInfo LoggedIn(string userID); 107 GridUserInfo LoggedIn(string userID);
108 bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 108
109 /// <summary>
110 /// Informs the grid that a user is logged out and to remove any session data for them
111 /// </summary>
112 /// <param name="userID">Ignore if your connector does not use userID for logouts</param>
113 /// <param name="sessionID">Ignore if your connector does not use sessionID for logouts</param>
114 /// <param name="regionID">RegionID where the user was last located</param>
115 /// <param name="lastPosition">Last region-relative position of the user</param>
116 /// <param name="lastLookAt">Last normalized look direction for the user</param>
117 /// <returns>True if the logout request was successfully processed, otherwise false</returns>
118 bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
109 119
110 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); 120 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
111 bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 121
112 122 /// <summary>
123 /// Stores the last known user position at the grid level
124 /// </summary>
125 /// <param name="userID">Ignore if your connector does not use userID for position updates</param>
126 /// <param name="sessionID">Ignore if your connector does not use sessionID for position updates</param>
127 /// <param name="regionID">RegionID where the user is currently located</param>
128 /// <param name="lastPosition">Region-relative position</param>
129 /// <param name="lastLookAt">Normalized look direction</param>
130 /// <returns>True if the user's last position was successfully updated, otherwise false</returns>
131 bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
132
113 GridUserInfo GetGridUserInfo(string userID); 133 GridUserInfo GetGridUserInfo(string userID);
114 } 134 }
115} \ No newline at end of file 135} \ No newline at end of file
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 697ba63..9b18915 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Services.UserAccountService
92 return GetGridUserInfo(userID); 92 return GetGridUserInfo(userID);
93 } 93 }
94 94
95 public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 95 public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
96 { 96 {
97 m_log.DebugFormat("[GRID USER SERVICE]: User {0} is offline", userID); 97 m_log.DebugFormat("[GRID USER SERVICE]: User {0} is offline", userID);
98 GridUserData d = m_Database.Get(userID); 98 GridUserData d = m_Database.Get(userID);
@@ -139,7 +139,7 @@ namespace OpenSim.Services.UserAccountService
139 return m_Database.Store(d); 139 return m_Database.Store(d);
140 } 140 }
141 141
142 public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 142 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
143 { 143 {
144 //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID); 144 //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID);
145 GridUserData d = m_Database.Get(userID); 145 GridUserData d = m_Database.Get(userID);