diff options
Diffstat (limited to 'OpenSim/Client')
-rw-r--r-- | OpenSim/Client/Linden/LLProxyLoginModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Client/Linden/LLStandaloneLoginModule.cs | 5 | ||||
-rw-r--r-- | OpenSim/Client/Linden/LLStandaloneLoginService.cs | 10 | ||||
-rw-r--r-- | OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | 17 |
4 files changed, 31 insertions, 14 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 67d5f4c..fd8c4dd 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -208,21 +208,22 @@ namespace OpenSim.Client.Linden | |||
208 | { | 208 | { |
209 | denyMess = "User is banned from this region"; | 209 | denyMess = "User is banned from this region"; |
210 | m_log.InfoFormat( | 210 | m_log.InfoFormat( |
211 | "[CLIENT]: Denying access for user {0} {1} because user is banned", | 211 | "[CLIENT]: Denying access for user {0} {1} because user is banned", |
212 | agentData.firstname, agentData.lastname); | 212 | agentData.firstname, agentData.lastname); |
213 | } | 213 | } |
214 | else | 214 | else |
215 | { | 215 | { |
216 | if (scene.NewUserConnection(agentData)) | 216 | string reason; |
217 | if (scene.NewUserConnection(agentData, out reason)) | ||
217 | { | 218 | { |
218 | success = true; | 219 | success = true; |
219 | } | 220 | } |
220 | else | 221 | else |
221 | { | 222 | { |
222 | denyMess = "Login refused by region"; | 223 | denyMess = String.Format("Login refused by region: {0}", reason); |
223 | m_log.InfoFormat( | 224 | m_log.InfoFormat( |
224 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", | 225 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", |
225 | agentData.firstname, agentData.lastname); | 226 | agentData.firstname, agentData.lastname); |
226 | } | 227 | } |
227 | } | 228 | } |
228 | 229 | ||
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 00a6d05..dbc401b 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs | |||
@@ -154,13 +154,14 @@ namespace OpenSim.Client.Linden | |||
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent) | 157 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason) |
158 | { | 158 | { |
159 | Scene scene; | 159 | Scene scene; |
160 | if (TryGetRegion(regionHandle, out scene)) | 160 | if (TryGetRegion(regionHandle, out scene)) |
161 | { | 161 | { |
162 | return scene.NewUserConnection(agent); | 162 | return scene.NewUserConnection(agent, out reason); |
163 | } | 163 | } |
164 | reason = "Region not found."; | ||
164 | return false; | 165 | return false; |
165 | } | 166 | } |
166 | 167 | ||
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs index 7316587..58b004a 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs | |||
@@ -201,7 +201,15 @@ namespace OpenSim.Client.Linden | |||
201 | 201 | ||
202 | if (m_regionsConnector.RegionLoginsEnabled) | 202 | if (m_regionsConnector.RegionLoginsEnabled) |
203 | { | 203 | { |
204 | return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent); | 204 | string reason; |
205 | bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
206 | if (!success) | ||
207 | { | ||
208 | response.ErrorReason = "key"; | ||
209 | response.ErrorMessage = reason; | ||
210 | } | ||
211 | return success; | ||
212 | // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
205 | } | 213 | } |
206 | 214 | ||
207 | return false; | 215 | return false; |
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index 5167f42..2f60810 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | |||
@@ -312,6 +312,8 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
312 | { | 312 | { |
313 | Scene scene = m_scenes[sceneId]; | 313 | Scene scene = m_scenes[sceneId]; |
314 | UUID mxpSessionID = UUID.Random(); | 314 | UUID mxpSessionID = UUID.Random(); |
315 | |||
316 | string reason; | ||
315 | 317 | ||
316 | m_log.Debug("[MXP ClientStack]: Session join request success: " + session.SessionId + " (" + | 318 | m_log.Debug("[MXP ClientStack]: Session join request success: " + session.SessionId + " (" + |
317 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + | 319 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + |
@@ -321,7 +323,13 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
321 | AttachUserAgentToUserProfile(session, mxpSessionID, sceneId, user); | 323 | AttachUserAgentToUserProfile(session, mxpSessionID, sceneId, user); |
322 | m_log.Debug("[MXP ClientStack]: Attached UserAgent to UserProfile."); | 324 | m_log.Debug("[MXP ClientStack]: Attached UserAgent to UserProfile."); |
323 | m_log.Debug("[MXP ClientStack]: Preparing Scene to Connection..."); | 325 | m_log.Debug("[MXP ClientStack]: Preparing Scene to Connection..."); |
324 | PrepareSceneForConnection(mxpSessionID, sceneId, user); | 326 | if (!PrepareSceneForConnection(mxpSessionID, sceneId, user, out reason)) |
327 | { | ||
328 | m_log.DebugFormat("[MXP ClientStack]: Scene refused connection: {0}", reason); | ||
329 | DeclineConnection(session, joinRequestMessage); | ||
330 | tmpRemove.Add(session); | ||
331 | continue; | ||
332 | } | ||
325 | m_log.Debug("[MXP ClientStack]: Prepared Scene to Connection."); | 333 | m_log.Debug("[MXP ClientStack]: Prepared Scene to Connection."); |
326 | m_log.Debug("[MXP ClientStack]: Accepting connection..."); | 334 | m_log.Debug("[MXP ClientStack]: Accepting connection..."); |
327 | AcceptConnection(session, joinRequestMessage, mxpSessionID, userId); | 335 | AcceptConnection(session, joinRequestMessage, mxpSessionID, userId); |
@@ -579,7 +587,7 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
579 | //userService.CommitAgent(ref userProfile); | 587 | //userService.CommitAgent(ref userProfile); |
580 | } | 588 | } |
581 | 589 | ||
582 | private void PrepareSceneForConnection(UUID sessionId, UUID sceneId, UserProfileData userProfile) | 590 | private bool PrepareSceneForConnection(UUID sessionId, UUID sceneId, UserProfileData userProfile, out string reason) |
583 | { | 591 | { |
584 | Scene scene = m_scenes[sceneId]; | 592 | Scene scene = m_scenes[sceneId]; |
585 | CommunicationsManager commsManager = m_scenes[sceneId].CommsManager; | 593 | CommunicationsManager commsManager = m_scenes[sceneId].CommsManager; |
@@ -603,9 +611,8 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
603 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); | 611 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); |
604 | agent.Appearance = new AvatarAppearance(); | 612 | agent.Appearance = new AvatarAppearance(); |
605 | } | 613 | } |
606 | 614 | ||
607 | scene.NewUserConnection(agent); | 615 | return scene.NewUserConnection(agent, out reason); |
608 | |||
609 | } | 616 | } |
610 | 617 | ||
611 | public void PrintDebugInformation() | 618 | public void PrintDebugInformation() |