diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 74ece2e..3f29401 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -50,6 +50,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
50 | 50 | ||
51 | private bool m_Enabled = false; | 51 | private bool m_Enabled = false; |
52 | 52 | ||
53 | public LocalGridServicesConnector(IConfigSource source) | ||
54 | { | ||
55 | InitialiseService(source); | ||
56 | } | ||
57 | |||
53 | #region ISharedRegionModule | 58 | #region ISharedRegionModule |
54 | 59 | ||
55 | public Type ReplaceableInterface | 60 | public Type ReplaceableInterface |
@@ -70,38 +75,43 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
70 | string name = moduleConfig.GetString("GridServices", ""); | 75 | string name = moduleConfig.GetString("GridServices", ""); |
71 | if (name == Name) | 76 | if (name == Name) |
72 | { | 77 | { |
73 | IConfig assetConfig = source.Configs["GridService"]; | 78 | InitialiseService(source); |
74 | if (assetConfig == null) | ||
75 | { | ||
76 | m_log.Error("[GRID CONNECTOR]: GridService missing from OpenSim.ini"); | ||
77 | return; | ||
78 | } | ||
79 | |||
80 | string serviceDll = assetConfig.GetString("LocalServiceModule", | ||
81 | String.Empty); | ||
82 | |||
83 | if (serviceDll == String.Empty) | ||
84 | { | ||
85 | m_log.Error("[GRID CONNECTOR]: No LocalServiceModule named in section GridService"); | ||
86 | return; | ||
87 | } | ||
88 | |||
89 | Object[] args = new Object[] { source }; | ||
90 | m_GridService = | ||
91 | ServerUtils.LoadPlugin<IGridService>(serviceDll, | ||
92 | args); | ||
93 | |||
94 | if (m_GridService == null) | ||
95 | { | ||
96 | m_log.Error("[GRID CONNECTOR]: Can't load asset service"); | ||
97 | return; | ||
98 | } | ||
99 | m_Enabled = true; | 79 | m_Enabled = true; |
100 | m_log.Info("[GRID CONNECTOR]: Local grid connector enabled"); | 80 | m_log.Info("[LOCAL GRID CONNECTOR]: Local grid connector enabled"); |
101 | } | 81 | } |
102 | } | 82 | } |
103 | } | 83 | } |
104 | 84 | ||
85 | private void InitialiseService(IConfigSource source) | ||
86 | { | ||
87 | IConfig assetConfig = source.Configs["GridService"]; | ||
88 | if (assetConfig == null) | ||
89 | { | ||
90 | m_log.Error("[LOCAL GRID CONNECTOR]: GridService missing from OpenSim.ini"); | ||
91 | return; | ||
92 | } | ||
93 | |||
94 | string serviceDll = assetConfig.GetString("LocalServiceModule", | ||
95 | String.Empty); | ||
96 | |||
97 | if (serviceDll == String.Empty) | ||
98 | { | ||
99 | m_log.Error("[LOCAL GRID CONNECTOR]: No LocalServiceModule named in section GridService"); | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | Object[] args = new Object[] { source }; | ||
104 | m_GridService = | ||
105 | ServerUtils.LoadPlugin<IGridService>(serviceDll, | ||
106 | args); | ||
107 | |||
108 | if (m_GridService == null) | ||
109 | { | ||
110 | m_log.Error("[LOCAL GRID CONNECTOR]: Can't load asset service"); | ||
111 | return; | ||
112 | } | ||
113 | } | ||
114 | |||
105 | public void PostInitialise() | 115 | public void PostInitialise() |
106 | { | 116 | { |
107 | } | 117 | } |