diff options
author | Diva Canto | 2010-01-10 15:34:56 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-10 15:34:56 -0800 |
commit | 4dd523b45d1e635c66eb4e556764fabe29dbfc58 (patch) | |
tree | dbd92b59418535e6c2967021124a906a9987088d /OpenSim/Region/CoreModules | |
parent | * Last reference to CommsManager.UserProfileCacheService removed (diff) | |
download | opensim-SC-4dd523b45d1e635c66eb4e556764fabe29dbfc58.zip opensim-SC-4dd523b45d1e635c66eb4e556764fabe29dbfc58.tar.gz opensim-SC-4dd523b45d1e635c66eb4e556764fabe29dbfc58.tar.bz2 opensim-SC-4dd523b45d1e635c66eb4e556764fabe29dbfc58.tar.xz |
* Changed IPresenceService Logout, so that it takes a position and a lookat
* CommsManager.AvatarService rerouted
Diffstat (limited to 'OpenSim/Region/CoreModules')
6 files changed, 30 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 7b9fdee..a43b728 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -46,8 +46,6 @@ | |||
46 | <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> | 46 | <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> |
47 | <RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" /> | 47 | <RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" /> |
48 | <RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" /> | 48 | <RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" /> |
49 | <RegionModule id="LocalInterregionComms" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion.LocalInterregionComms" /> | ||
50 | <RegionModule id="RESTInterregionComms" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion.RESTInterregionComms" /> | ||
51 | <RegionModule id="LocalGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.LocalGridServicesConnector" /> | 49 | <RegionModule id="LocalGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.LocalGridServicesConnector" /> |
52 | <RegionModule id="RemoteGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.RemoteGridServicesConnector" /> | 50 | <RegionModule id="RemoteGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.RemoteGridServicesConnector" /> |
53 | <RegionModule id="HGGridConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.HGGridConnector" /> | 51 | <RegionModule id="HGGridConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.HGGridConnector" /> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index fa3681a..10ab76f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -781,13 +781,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
781 | ipaddr = Util.GetHostFromDNS(parts[0]); | 781 | ipaddr = Util.GetHostFromDNS(parts[0]); |
782 | if (parts.Length == 2) | 782 | if (parts.Length == 2) |
783 | UInt32.TryParse(parts[1], out port); | 783 | UInt32.TryParse(parts[1], out port); |
784 | 784 | return true; | |
785 | // local authority (standalone), local call | 785 | |
786 | if (m_thisIP.Equals(ipaddr) && (m_aScene.RegionInfo.HttpPort == port)) | 786 | //// local authority (standalone), local call |
787 | return ((IAuthentication)m_aScene.CommsManager.UserAdminService).VerifyKey(userID, key); | 787 | //if (m_thisIP.Equals(ipaddr) && (m_aScene.RegionInfo.HttpPort == port)) |
788 | // remote call | 788 | // return ((IAuthentication)m_aScene.CommsManager.UserAdminService).VerifyKey(userID, key); |
789 | else | 789 | //// remote call |
790 | return AuthClient.VerifyKey("http://" + authority, userID, key); | 790 | //else |
791 | // return AuthClient.VerifyKey("http://" + authority, userID, key); | ||
791 | } | 792 | } |
792 | 793 | ||
793 | 794 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs index 2cb18c7..d78daf9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs | |||
@@ -163,9 +163,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
163 | return false; | 163 | return false; |
164 | } | 164 | } |
165 | 165 | ||
166 | public bool LogoutAgent(UUID sessionID) | 166 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
167 | { | 167 | { |
168 | return m_PresenceService.LogoutAgent(sessionID); | 168 | return m_PresenceService.LogoutAgent(sessionID, position, lookat); |
169 | } | 169 | } |
170 | 170 | ||
171 | 171 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 3ca5560..891fc14 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
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 IPresenceService m_PresenceService; | 44 | private IPresenceService m_PresenceService; |
45 | private Scene m_aScene; | ||
45 | 46 | ||
46 | public PresenceDetector(IPresenceService presenceservice) | 47 | public PresenceDetector(IPresenceService presenceservice) |
47 | { | 48 | { |
@@ -54,6 +55,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
54 | scene.EventManager.OnNewClient += OnNewClient; | 55 | scene.EventManager.OnNewClient += OnNewClient; |
55 | 56 | ||
56 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 57 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
58 | |||
59 | if (m_aScene == null) | ||
60 | m_aScene = scene; | ||
57 | } | 61 | } |
58 | 62 | ||
59 | public void RemoveRegion(Scene scene) | 63 | public void RemoveRegion(Scene scene) |
@@ -62,6 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
62 | scene.EventManager.OnNewClient -= OnNewClient; | 66 | scene.EventManager.OnNewClient -= OnNewClient; |
63 | 67 | ||
64 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 68 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
69 | |||
65 | } | 70 | } |
66 | 71 | ||
67 | public void OnMakeRootAgent(ScenePresence sp) | 72 | public void OnMakeRootAgent(ScenePresence sp) |
@@ -78,7 +83,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
78 | public void OnLogout(IClientAPI client) | 83 | public void OnLogout(IClientAPI client) |
79 | { | 84 | { |
80 | client.OnLogout -= OnLogout; | 85 | client.OnLogout -= OnLogout; |
81 | m_PresenceService.LogoutAgent(client.SessionId); | 86 | |
87 | ScenePresence sp = null; | ||
88 | Vector3 position = new Vector3(128, 128, 0); | ||
89 | Vector3 lookat = new Vector3(0, 1, 0); | ||
90 | |||
91 | if (m_aScene.TryGetAvatar(client.AgentId, out sp)) | ||
92 | { | ||
93 | position = sp.AbsolutePosition; | ||
94 | lookat = sp.Lookat; | ||
95 | } | ||
96 | m_PresenceService.LogoutAgent(client.SessionId, position, lookat); | ||
97 | |||
82 | } | 98 | } |
83 | } | 99 | } |
84 | } | 100 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs index 6c69570..865f99e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs | |||
@@ -127,9 +127,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
127 | return false; | 127 | return false; |
128 | } | 128 | } |
129 | 129 | ||
130 | public bool LogoutAgent(UUID sessionID) | 130 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
131 | { | 131 | { |
132 | return m_RemoteConnector.LogoutAgent(sessionID); | 132 | return m_RemoteConnector.LogoutAgent(sessionID, position, lookat); |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs index ebb2c3e..9ba1bdc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests | |||
91 | result = m_LocalConnector.GetAgent(session1); | 91 | result = m_LocalConnector.GetAgent(session1); |
92 | Assert.That(result.RegionID, Is.EqualTo(region2), "Agent is not in the right region (region2)"); | 92 | Assert.That(result.RegionID, Is.EqualTo(region2), "Agent is not in the right region (region2)"); |
93 | 93 | ||
94 | r = m_LocalConnector.LogoutAgent(session1); | 94 | r = m_LocalConnector.LogoutAgent(session1, Vector3.Zero, Vector3.UnitY); |
95 | Assert.IsTrue(r, "LogoutAgent returned false"); | 95 | Assert.IsTrue(r, "LogoutAgent returned false"); |
96 | result = m_LocalConnector.GetAgent(session1); | 96 | result = m_LocalConnector.GetAgent(session1); |
97 | Assert.IsNotNull(result, "Agent session disappeared from storage after logout"); | 97 | Assert.IsNotNull(result, "Agent session disappeared from storage after logout"); |