diff options
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 4fceef6..c2c7168 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
98 | 98 | ||
99 | public SimianGridServiceConnector(IConfigSource source) | 99 | public SimianGridServiceConnector(IConfigSource source) |
100 | { | 100 | { |
101 | Initialise(source); | 101 | CommonInit(source); |
102 | } | 102 | } |
103 | 103 | ||
104 | public void Initialise(IConfigSource source) | 104 | public void Initialise(IConfigSource source) |
@@ -108,24 +108,27 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
108 | { | 108 | { |
109 | string name = moduleConfig.GetString("GridServices", ""); | 109 | string name = moduleConfig.GetString("GridServices", ""); |
110 | if (name == Name) | 110 | if (name == Name) |
111 | { | 111 | CommonInit(source); |
112 | IConfig gridConfig = source.Configs["GridService"]; | 112 | } |
113 | if (gridConfig != null) | 113 | } |
114 | { | ||
115 | string serviceUrl = gridConfig.GetString("GridServerURI"); | ||
116 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
117 | { | ||
118 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
119 | serviceUrl = serviceUrl + '/'; | ||
120 | m_serverUrl = serviceUrl; | ||
121 | m_Enabled = true; | ||
122 | } | ||
123 | } | ||
124 | 114 | ||
125 | if (String.IsNullOrEmpty(m_serverUrl)) | 115 | private void CommonInit(IConfigSource source) |
126 | m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector"); | 116 | { |
117 | IConfig gridConfig = source.Configs["GridService"]; | ||
118 | if (gridConfig != null) | ||
119 | { | ||
120 | string serviceUrl = gridConfig.GetString("GridServerURI"); | ||
121 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
122 | { | ||
123 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
124 | serviceUrl = serviceUrl + '/'; | ||
125 | m_serverUrl = serviceUrl; | ||
126 | m_Enabled = true; | ||
127 | } | 127 | } |
128 | } | 128 | } |
129 | |||
130 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
131 | m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector"); | ||
129 | } | 132 | } |
130 | 133 | ||
131 | #region IGridService | 134 | #region IGridService |