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 | |
parent | normalize quats before applying llSetRot() (diff) | |
download | opensim-SC-a85f496f4d097a4441ae9e6df8e282c4b327e75a.zip opensim-SC-a85f496f4d097a4441ae9e6df8e282c4b327e75a.tar.gz opensim-SC-a85f496f4d097a4441ae9e6df8e282c4b327e75a.tar.bz2 opensim-SC-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/LLClientStackModule.cs | 24 | ||||
-rw-r--r-- | OpenSim/Client/Linden/LLProxyLoginModule.cs | 50 | ||||
-rw-r--r-- | OpenSim/Client/Linden/LLStandaloneLoginModule.cs | 72 | ||||
-rw-r--r-- | OpenSim/Client/Linden/Resources/LindenModules.addin.xml | 15 |
4 files changed, 125 insertions, 36 deletions
diff --git a/OpenSim/Client/Linden/LLClientStackModule.cs b/OpenSim/Client/Linden/LLClientStackModule.cs index 461c651..74612bb 100644 --- a/OpenSim/Client/Linden/LLClientStackModule.cs +++ b/OpenSim/Client/Linden/LLClientStackModule.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 | * |
@@ -41,7 +41,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
41 | 41 | ||
42 | namespace OpenSim.Client.Linden | 42 | namespace OpenSim.Client.Linden |
43 | { | 43 | { |
44 | public class LLClientStackModule : IRegionModule | 44 | public class LLClientStackModule : INonSharedRegionModule |
45 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
@@ -55,11 +55,10 @@ namespace OpenSim.Client.Linden | |||
55 | 55 | ||
56 | protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll"; | 56 | protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll"; |
57 | 57 | ||
58 | public void Initialise(Scene scene, IConfigSource source) | 58 | public void Initialise(IConfigSource source) |
59 | { | 59 | { |
60 | if (m_scene == null) | 60 | if (m_scene == null) |
61 | { | 61 | { |
62 | m_scene = scene; | ||
63 | m_source = source; | 62 | m_source = source; |
64 | 63 | ||
65 | IConfig startupConfig = m_source.Configs["Startup"]; | 64 | IConfig startupConfig = m_source.Configs["Startup"]; |
@@ -70,8 +69,23 @@ namespace OpenSim.Client.Linden | |||
70 | } | 69 | } |
71 | } | 70 | } |
72 | 71 | ||
73 | public void PostInitialise() | 72 | public void AddRegion(Scene scene) |
74 | { | 73 | { |
74 | |||
75 | } | ||
76 | |||
77 | public void RemoveRegion(Scene scene) | ||
78 | { | ||
79 | |||
80 | } | ||
81 | |||
82 | public void RegionLoaded(Scene scene) | ||
83 | { | ||
84 | if (m_scene == null) | ||
85 | { | ||
86 | m_scene = scene; | ||
87 | } | ||
88 | |||
75 | if ((m_scene != null) && (m_createClientStack)) | 89 | if ((m_scene != null) && (m_createClientStack)) |
76 | { | 90 | { |
77 | m_log.Info("[LLClientStackModule] Starting up LLClientStack."); | 91 | m_log.Info("[LLClientStackModule] Starting up LLClientStack."); |
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 | { |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index dbc401b..6474feb 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.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 | * |
@@ -44,7 +44,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
44 | 44 | ||
45 | namespace OpenSim.Client.Linden | 45 | namespace OpenSim.Client.Linden |
46 | { | 46 | { |
47 | public class LLStandaloneLoginModule : IRegionModule, ILoginServiceToRegionsConnector | 47 | public class LLStandaloneLoginModule : ISharedRegionModule, ILoginServiceToRegionsConnector |
48 | { | 48 | { |
49 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
@@ -53,6 +53,8 @@ namespace OpenSim.Client.Linden | |||
53 | 53 | ||
54 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode | 54 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode |
55 | 55 | ||
56 | protected bool authenticate; | ||
57 | protected string welcomeMessage; | ||
56 | 58 | ||
57 | public bool RegionLoginsEnabled | 59 | public bool RegionLoginsEnabled |
58 | { | 60 | { |
@@ -68,38 +70,44 @@ namespace OpenSim.Client.Linden | |||
68 | } | 70 | } |
69 | } | 71 | } |
70 | } | 72 | } |
71 | 73 | ||
72 | protected LLStandaloneLoginService m_loginService; | 74 | protected LLStandaloneLoginService m_loginService; |
73 | 75 | ||
74 | #region IRegionModule Members | 76 | #region IRegionModule Members |
75 | 77 | ||
76 | public void Initialise(Scene scene, IConfigSource source) | 78 | public void Initialise(IConfigSource source) |
77 | { | 79 | { |
78 | if (m_firstScene == null) | 80 | IConfig startupConfig = source.Configs["Startup"]; |
81 | if (startupConfig != null) | ||
79 | { | 82 | { |
80 | m_firstScene = scene; | 83 | m_enabled = !startupConfig.GetBoolean("gridmode", false); |
84 | } | ||
81 | 85 | ||
82 | IConfig startupConfig = source.Configs["Startup"]; | 86 | if (m_enabled) |
83 | if (startupConfig != null) | 87 | { |
88 | authenticate = true; | ||
89 | welcomeMessage = "Welcome to OpenSim"; | ||
90 | IConfig standaloneConfig = source.Configs["StandAlone"]; | ||
91 | if (standaloneConfig != null) | ||
84 | { | 92 | { |
85 | m_enabled = !startupConfig.GetBoolean("gridmode", false); | 93 | authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true); |
94 | welcomeMessage = standaloneConfig.GetString("welcome_message"); | ||
86 | } | 95 | } |
96 | } | ||
97 | } | ||
98 | |||
99 | public void AddRegion(Scene scene) | ||
100 | { | ||
101 | if (m_firstScene == null) | ||
102 | { | ||
103 | m_firstScene = scene; | ||
87 | 104 | ||
88 | if (m_enabled) | 105 | if (m_enabled) |
89 | { | 106 | { |
90 | bool authenticate = true; | ||
91 | string welcomeMessage = "Welcome to OpenSim"; | ||
92 | IConfig standaloneConfig = source.Configs["StandAlone"]; | ||
93 | if (standaloneConfig != null) | ||
94 | { | ||
95 | authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true); | ||
96 | welcomeMessage = standaloneConfig.GetString("welcome_message"); | ||
97 | } | ||
98 | |||
99 | //TODO: fix casting. | 107 | //TODO: fix casting. |
100 | LibraryRootFolder rootFolder | 108 | LibraryRootFolder rootFolder |
101 | = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder; | 109 | = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder; |
102 | 110 | ||
103 | IHttpServer httpServer = m_firstScene.CommsManager.HttpServer; | 111 | IHttpServer httpServer = m_firstScene.CommsManager.HttpServer; |
104 | 112 | ||
105 | //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference | 113 | //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference |
@@ -121,6 +129,14 @@ namespace OpenSim.Client.Linden | |||
121 | } | 129 | } |
122 | } | 130 | } |
123 | 131 | ||
132 | public void RemoveRegion(Scene scene) | ||
133 | { | ||
134 | if (m_enabled) | ||
135 | { | ||
136 | RemoveScene(scene); | ||
137 | } | ||
138 | } | ||
139 | |||
124 | public void PostInitialise() | 140 | public void PostInitialise() |
125 | { | 141 | { |
126 | 142 | ||
@@ -131,6 +147,11 @@ namespace OpenSim.Client.Linden | |||
131 | 147 | ||
132 | } | 148 | } |
133 | 149 | ||
150 | public void RegionLoaded(Scene scene) | ||
151 | { | ||
152 | |||
153 | } | ||
154 | |||
134 | public string Name | 155 | public string Name |
135 | { | 156 | { |
136 | get { return "LLStandaloneLoginModule"; } | 157 | get { return "LLStandaloneLoginModule"; } |
@@ -154,6 +175,17 @@ namespace OpenSim.Client.Linden | |||
154 | } | 175 | } |
155 | } | 176 | } |
156 | 177 | ||
178 | protected void RemoveScene(Scene scene) | ||
179 | { | ||
180 | lock (m_scenes) | ||
181 | { | ||
182 | if (m_scenes.Contains(scene)) | ||
183 | { | ||
184 | m_scenes.Remove(scene); | ||
185 | } | ||
186 | } | ||
187 | } | ||
188 | |||
157 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason) | 189 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason) |
158 | { | 190 | { |
159 | Scene scene; | 191 | Scene scene; |
diff --git a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml b/OpenSim/Client/Linden/Resources/LindenModules.addin.xml new file mode 100644 index 0000000..6a55ce8 --- /dev/null +++ b/OpenSim/Client/Linden/Resources/LindenModules.addin.xml | |||
@@ -0,0 +1,15 @@ | |||
1 | <Addin id="OpenSim.Client.Linden.LindenModules" version="0.2"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.Client.Linden.dll"/> | ||
4 | </Runtime> | ||
5 | |||
6 | <Dependencies> | ||
7 | <Addin id="OpenSim" version="0.5" /> | ||
8 | </Dependencies> | ||
9 | |||
10 | <Extension path = "/OpenSim/RegionModules"> | ||
11 | <RegionModule id="LLStandaloneLoginModule" type="OpenSim.Client.Linden.LLStandaloneLoginModule" /> | ||
12 | <RegionModule id="LLProxyLoginModule" type="OpenSim.Client.Linden.LLProxyLoginModule" /> | ||
13 | <RegionModule id="LLClientStackModule" type="OpenSim.Client.Linden.LLClientStackModule" /> | ||
14 | </Extension> | ||
15 | </Addin> | ||