diff options
author | Arthur Valadares | 2009-05-21 20:28:59 +0000 |
---|---|---|
committer | Arthur Valadares | 2009-05-21 20:28:59 +0000 |
commit | a85f496f4d097a4441ae9e6df8e282c4b327e75a (patch) | |
tree | 794b7cec23fab7803c7f3b4f496868ef96d01f53 /OpenSim/Client/Linden/LLProxyLoginModule.cs | |
parent | normalize quats before applying llSetRot() (diff) | |
download | opensim-SC_OLD-a85f496f4d097a4441ae9e6df8e282c4b327e75a.zip opensim-SC_OLD-a85f496f4d097a4441ae9e6df8e282c4b327e75a.tar.gz opensim-SC_OLD-a85f496f4d097a4441ae9e6df8e282c4b327e75a.tar.bz2 opensim-SC_OLD-a85f496f4d097a4441ae9e6df8e282c4b327e75a.tar.xz |
* Upgraded LLStandaloneLoginModule, LLProxyLoginModule and LLClientStackModule to new
region modules. This was needed because the stand alone and grid modules weren't deleting
old scenes, which caused an issue when deleting and recreating a region with same name
on same x,y coordinates. Tested it on standalone and issue is fixed. Requires prebuild
to be run again.
Fixes Mantis #3699
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Client/Linden/LLProxyLoginModule.cs | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index fd8c4dd..b7b9adb 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -48,7 +48,7 @@ namespace OpenSim.Client.Linden | |||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Handles login user (expect user) and logoff user messages from the remote LL login server | 49 | /// Handles login user (expect user) and logoff user messages from the remote LL login server |
50 | /// </summary> | 50 | /// </summary> |
51 | public class LLProxyLoginModule : IRegionModule | 51 | public class LLProxyLoginModule : ISharedRegionModule |
52 | { | 52 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | 54 | ||
@@ -74,18 +74,21 @@ namespace OpenSim.Client.Linden | |||
74 | 74 | ||
75 | #region IRegionModule Members | 75 | #region IRegionModule Members |
76 | 76 | ||
77 | public void Initialise(Scene scene, IConfigSource source) | 77 | public void Initialise(IConfigSource source) |
78 | { | ||
79 | IConfig startupConfig = source.Configs["Startup"]; | ||
80 | if (startupConfig != null) | ||
81 | { | ||
82 | m_enabled = startupConfig.GetBoolean("gridmode", false); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | public void AddRegion(Scene scene) | ||
78 | { | 87 | { |
79 | if (m_firstScene == null) | 88 | if (m_firstScene == null) |
80 | { | 89 | { |
81 | m_firstScene = scene; | 90 | m_firstScene = scene; |
82 | 91 | ||
83 | IConfig startupConfig = source.Configs["Startup"]; | ||
84 | if (startupConfig != null) | ||
85 | { | ||
86 | m_enabled = startupConfig.GetBoolean("gridmode", false); | ||
87 | } | ||
88 | |||
89 | if (m_enabled) | 92 | if (m_enabled) |
90 | { | 93 | { |
91 | AddHttpHandlers(); | 94 | AddHttpHandlers(); |
@@ -96,6 +99,15 @@ namespace OpenSim.Client.Linden | |||
96 | { | 99 | { |
97 | AddScene(scene); | 100 | AddScene(scene); |
98 | } | 101 | } |
102 | |||
103 | } | ||
104 | |||
105 | public void RemoveRegion(Scene scene) | ||
106 | { | ||
107 | if (m_enabled) | ||
108 | { | ||
109 | RemoveScene(scene); | ||
110 | } | ||
99 | } | 111 | } |
100 | 112 | ||
101 | public void PostInitialise() | 113 | public void PostInitialise() |
@@ -108,6 +120,11 @@ namespace OpenSim.Client.Linden | |||
108 | 120 | ||
109 | } | 121 | } |
110 | 122 | ||
123 | public void RegionLoaded(Scene scene) | ||
124 | { | ||
125 | |||
126 | } | ||
127 | |||
111 | public string Name | 128 | public string Name |
112 | { | 129 | { |
113 | get { return "LLProxyLoginModule"; } | 130 | get { return "LLProxyLoginModule"; } |
@@ -140,6 +157,17 @@ namespace OpenSim.Client.Linden | |||
140 | } | 157 | } |
141 | } | 158 | } |
142 | } | 159 | } |
160 | |||
161 | protected void RemoveScene(Scene scene) | ||
162 | { | ||
163 | lock (m_scenes) | ||
164 | { | ||
165 | if (m_scenes.Contains(scene)) | ||
166 | { | ||
167 | m_scenes.Remove(scene); | ||
168 | } | ||
169 | } | ||
170 | } | ||
143 | /// <summary> | 171 | /// <summary> |
144 | /// Received from the user server when a user starts logging in. This call allows | 172 | /// Received from the user server when a user starts logging in. This call allows |
145 | /// the region to prepare for direct communication from the client. Sends back an empty | 173 | /// the region to prepare for direct communication from the client. Sends back an empty |
@@ -200,7 +228,7 @@ namespace OpenSim.Client.Linden | |||
200 | { | 228 | { |
201 | bool success = false; | 229 | bool success = false; |
202 | string denyMess = ""; | 230 | string denyMess = ""; |
203 | 231 | ||
204 | Scene scene; | 232 | Scene scene; |
205 | if (TryGetRegion(regionHandle, out scene)) | 233 | if (TryGetRegion(regionHandle, out scene)) |
206 | { | 234 | { |
@@ -226,7 +254,7 @@ namespace OpenSim.Client.Linden | |||
226 | agentData.firstname, agentData.lastname); | 254 | agentData.firstname, agentData.lastname); |
227 | } | 255 | } |
228 | } | 256 | } |
229 | 257 | ||
230 | } | 258 | } |
231 | else | 259 | else |
232 | { | 260 | { |