diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
6 files changed, 22 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs index 4eff60e..8a22cfc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
69 | IConfig assetConfig = source.Configs["AssetService"]; | 69 | IConfig assetConfig = source.Configs["AssetService"]; |
70 | if (assetConfig == null) | 70 | if (assetConfig == null) |
71 | { | 71 | { |
72 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini"); | 72 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); |
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs index 48759b5..d665a54 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar | |||
66 | IConfig userConfig = source.Configs["AvatarService"]; | 66 | IConfig userConfig = source.Configs["AvatarService"]; |
67 | if (userConfig == null) | 67 | if (userConfig == null) |
68 | { | 68 | { |
69 | m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpanSim.ini"); | 69 | m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini"); |
70 | return; | 70 | return; |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 891fc14..e98df28 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -77,23 +77,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
77 | 77 | ||
78 | public void OnNewClient(IClientAPI client) | 78 | public void OnNewClient(IClientAPI client) |
79 | { | 79 | { |
80 | client.OnLogout += OnLogout; | 80 | client.OnConnectionClosed += OnConnectionClose; |
81 | } | 81 | } |
82 | 82 | ||
83 | public void OnLogout(IClientAPI client) | 83 | public void OnConnectionClose(IClientAPI client) |
84 | { | 84 | { |
85 | client.OnLogout -= OnLogout; | 85 | if (client.IsLoggingOut) |
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 | { | 86 | { |
93 | position = sp.AbsolutePosition; | 87 | object sp = null; |
94 | lookat = sp.Lookat; | 88 | Vector3 position = new Vector3(128, 128, 0); |
89 | Vector3 lookat = new Vector3(0, 1, 0); | ||
90 | |||
91 | if (client.Scene.TryGetAvatar(client.AgentId, out sp)) | ||
92 | { | ||
93 | if (sp is ScenePresence) | ||
94 | { | ||
95 | position = ((ScenePresence)sp).AbsolutePosition; | ||
96 | lookat = ((ScenePresence)sp).Lookat; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | m_PresenceService.LogoutAgent(client.SessionId, position, lookat); | ||
95 | } | 101 | } |
96 | m_PresenceService.LogoutAgent(client.SessionId, position, lookat); | ||
97 | 102 | ||
98 | } | 103 | } |
99 | } | 104 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index e913891..783d606 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
69 | //IConfig userConfig = config.Configs["SimulationService"]; | 69 | //IConfig userConfig = config.Configs["SimulationService"]; |
70 | //if (userConfig == null) | 70 | //if (userConfig == null) |
71 | //{ | 71 | //{ |
72 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); | 72 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini"); |
73 | // return; | 73 | // return; |
74 | //} | 74 | //} |
75 | 75 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 2b1f815..4d82a05 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
74 | //IConfig userConfig = config.Configs["SimulationService"]; | 74 | //IConfig userConfig = config.Configs["SimulationService"]; |
75 | //if (userConfig == null) | 75 | //if (userConfig == null) |
76 | //{ | 76 | //{ |
77 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); | 77 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini"); |
78 | // return; | 78 | // return; |
79 | //} | 79 | //} |
80 | 80 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 13acdf2..1140692 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
69 | IConfig userConfig = source.Configs["UserAccountService"]; | 69 | IConfig userConfig = source.Configs["UserAccountService"]; |
70 | if (userConfig == null) | 70 | if (userConfig == null) |
71 | { | 71 | { |
72 | m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpanSim.ini"); | 72 | m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpenSim.ini"); |
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||