diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs | 16 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 11 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserServerCommsManager.cs | 40 |
3 files changed, 51 insertions, 16 deletions
diff --git a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs index 485dd46..51f9708 100644 --- a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs +++ b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs | |||
@@ -43,13 +43,8 @@ namespace OpenSim.Grid.UserServer.Modules | |||
43 | { | 43 | { |
44 | protected IGridServiceCore m_core; | 44 | protected IGridServiceCore m_core; |
45 | 45 | ||
46 | public UserDataBaseService() | 46 | public UserDataBaseService(CommunicationsManager commsManager) |
47 | : base(null) | 47 | : base(commsManager) |
48 | { | ||
49 | } | ||
50 | |||
51 | public UserDataBaseService(IInterServiceInventoryServices interServiceInventoryService) | ||
52 | : base(interServiceInventoryService) | ||
53 | { | 48 | { |
54 | } | 49 | } |
55 | 50 | ||
@@ -57,13 +52,6 @@ namespace OpenSim.Grid.UserServer.Modules | |||
57 | { | 52 | { |
58 | m_core = core; | 53 | m_core = core; |
59 | 54 | ||
60 | //we only need core components so we can request them from here | ||
61 | IInterServiceInventoryServices inventoryService; | ||
62 | if (m_core.TryGet<IInterServiceInventoryServices>(out inventoryService)) | ||
63 | { | ||
64 | m_interServiceInventoryService = inventoryService; | ||
65 | } | ||
66 | |||
67 | UserConfig cfg; | 55 | UserConfig cfg; |
68 | if (m_core.TryGet<UserConfig>(out cfg)) | 56 | if (m_core.TryGet<UserConfig>(out cfg)) |
69 | { | 57 | { |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index c0cba4a..0a5abd3 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -145,9 +145,16 @@ namespace OpenSim.Grid.UserServer | |||
145 | /// <param name="inventoryService"></param> | 145 | /// <param name="inventoryService"></param> |
146 | protected virtual void StartupUserServerModules() | 146 | protected virtual void StartupUserServerModules() |
147 | { | 147 | { |
148 | m_log.Info("[STARTUP]: Establishing data connection"); | 148 | m_log.Info("[STARTUP]: Establishing data connection"); |
149 | |||
150 | //we only need core components so we can request them from here | ||
151 | IInterServiceInventoryServices inventoryService; | ||
152 | TryGet<IInterServiceInventoryServices>(out inventoryService); | ||
153 | |||
154 | CommunicationsManager commsManager = new UserServerCommsManager(inventoryService); | ||
155 | |||
149 | //setup database access service, for now this has to be created before the other modules. | 156 | //setup database access service, for now this has to be created before the other modules. |
150 | m_userDataBaseService = new UserDataBaseService(); | 157 | m_userDataBaseService = new UserDataBaseService(commsManager); |
151 | m_userDataBaseService.Initialise(this); | 158 | m_userDataBaseService.Initialise(this); |
152 | 159 | ||
153 | //TODO: change these modules so they fetch the databaseService class in the PostInitialise method | 160 | //TODO: change these modules so they fetch the databaseService class in the PostInitialise method |
diff --git a/OpenSim/Grid/UserServer/UserServerCommsManager.cs b/OpenSim/Grid/UserServer/UserServerCommsManager.cs new file mode 100644 index 0000000..519dfbc --- /dev/null +++ b/OpenSim/Grid/UserServer/UserServerCommsManager.cs | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.Framework.Communications; | ||
29 | |||
30 | namespace OpenSim.Grid.UserServer | ||
31 | { | ||
32 | public class UserServerCommsManager : CommunicationsManager | ||
33 | { | ||
34 | public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService) | ||
35 | : base(null, null, null, false, null) | ||
36 | { | ||
37 | m_interServiceInventoryService = interServiceInventoryService; | ||
38 | } | ||
39 | } | ||
40 | } | ||