diff options
author | John Hurliman | 2010-09-09 15:05:22 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-09 15:05:22 -0700 |
commit | 9609faa8eb330dc85dfb2efec1e7e5652f01d6f2 (patch) | |
tree | 9094aa5b12a11181f1bc657d28536d31ca9ba2b8 /OpenSim/Services/Connectors/SimianGrid | |
parent | Over a dozen thread safety fixes in FriendsModule (diff) | |
download | opensim-SC-9609faa8eb330dc85dfb2efec1e7e5652f01d6f2.zip opensim-SC-9609faa8eb330dc85dfb2efec1e7e5652f01d6f2.tar.gz opensim-SC-9609faa8eb330dc85dfb2efec1e7e5652f01d6f2.tar.bz2 opensim-SC-9609faa8eb330dc85dfb2efec1e7e5652f01d6f2.tar.xz |
* Run SimianGrid session updates asynchronously instead of from the main heartbeat thread
* Minor dead code cleanup
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid')
6 files changed, 5 insertions, 66 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs index a871d07..67b73f3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs | |||
@@ -26,11 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | 29 | using System.Reflection; |
31 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
32 | using OpenSim.Region.Framework.Scenes; | 31 | using OpenSim.Region.Framework.Scenes; |
33 | using OpenSim.Services.Interfaces; | ||
34 | using OpenMetaverse; | 32 | using OpenMetaverse; |
35 | using log4net; | 33 | using log4net; |
36 | 34 | ||
@@ -107,7 +105,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
107 | 105 | ||
108 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) | 106 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) |
109 | { | 107 | { |
110 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 108 | // Asynchronously update the position stored in the session table for this agent |
109 | Util.FireAndForget(delegate(object o) | ||
110 | { | ||
111 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
112 | }); | ||
111 | } | 113 | } |
112 | } | 114 | } |
113 | } | 115 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 3505c64..4d0d53e 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -28,8 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.IO; | ||
32 | using System.Net; | ||
33 | using System.Reflection; | 31 | using System.Reflection; |
34 | using log4net; | 32 | using log4net; |
35 | using Mono.Addins; | 33 | using Mono.Addins; |
@@ -37,7 +35,6 @@ using Nini.Config; | |||
37 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Server.Base; | ||
41 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
42 | using OpenMetaverse; | 39 | using OpenMetaverse; |
43 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 5b18aef..6f2d735 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |||
@@ -30,13 +30,10 @@ using System.Collections.Generic; | |||
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | using OpenMetaverse; | 34 | using OpenMetaverse; |
36 | using OpenMetaverse.StructuredData; | 35 | using OpenMetaverse.StructuredData; |
37 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
41 | 38 | ||
42 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | 39 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 3953369..21ad4ab 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -37,7 +37,6 @@ using OpenMetaverse.StructuredData; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Server.Base; | ||
41 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
42 | 41 | ||
43 | namespace OpenSim.Services.Connectors.SimianGrid | 42 | namespace OpenSim.Services.Connectors.SimianGrid |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 077be3c..a344594 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -28,17 +28,14 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.Net; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using log4net; | 32 | using log4net; |
34 | using Mono.Addins; | 33 | using Mono.Addins; |
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Servers.HttpServer; | ||
38 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
41 | using OpenSim.Server.Base; | ||
42 | using OpenMetaverse; | 39 | using OpenMetaverse; |
43 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
44 | 41 | ||
@@ -358,25 +355,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
358 | return null; | 355 | return null; |
359 | } | 356 | } |
360 | 357 | ||
361 | // private OSDMap GetSessionData(UUID sessionID) | ||
362 | // { | ||
363 | // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); | ||
364 | // | ||
365 | // NameValueCollection requestArgs = new NameValueCollection | ||
366 | // { | ||
367 | // { "RequestMethod", "GetSession" }, | ||
368 | // { "SessionID", sessionID.ToString() } | ||
369 | // }; | ||
370 | // | ||
371 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
372 | // if (response["Success"].AsBoolean()) | ||
373 | // return response; | ||
374 | // else | ||
375 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); | ||
376 | // | ||
377 | // return null; | ||
378 | // } | ||
379 | |||
380 | private List<PresenceInfo> GetSessions(UUID userID) | 358 | private List<PresenceInfo> GetSessions(UUID userID) |
381 | { | 359 | { |
382 | List<PresenceInfo> presences = new List<PresenceInfo>(1); | 360 | List<PresenceInfo> presences = new List<PresenceInfo>(1); |
@@ -429,39 +407,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
429 | return success; | 407 | return success; |
430 | } | 408 | } |
431 | 409 | ||
432 | ///// <summary> | ||
433 | ///// Fetch the last known avatar location with GetSession and persist it | ||
434 | ///// as user data with AddUserData | ||
435 | ///// </summary> | ||
436 | //private bool SetLastLocation(UUID sessionID) | ||
437 | //{ | ||
438 | // NameValueCollection requestArgs = new NameValueCollection | ||
439 | // { | ||
440 | // { "RequestMethod", "GetSession" }, | ||
441 | // { "SessionID", sessionID.ToString() } | ||
442 | // }; | ||
443 | |||
444 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
445 | // bool success = response["Success"].AsBoolean(); | ||
446 | |||
447 | // if (success) | ||
448 | // { | ||
449 | // UUID userID = response["UserID"].AsUUID(); | ||
450 | // UUID sceneID = response["SceneID"].AsUUID(); | ||
451 | // Vector3 position = response["ScenePosition"].AsVector3(); | ||
452 | // Vector3 lookAt = response["SceneLookAt"].AsVector3(); | ||
453 | |||
454 | // return SetLastLocation(userID, sceneID, position, lookAt); | ||
455 | // } | ||
456 | // else | ||
457 | // { | ||
458 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve presence information for session " + sessionID + | ||
459 | // " while saving last location: " + response["Message"].AsString()); | ||
460 | // } | ||
461 | |||
462 | // return success; | ||
463 | //} | ||
464 | |||
465 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) | 410 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) |
466 | { | 411 | { |
467 | if (sessionResponse == null) | 412 | if (sessionResponse == null) |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 1ac9882..ddd2322 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.IO; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |