aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs15
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs18
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs2
5 files changed, 30 insertions, 13 deletions
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");