diff options
author | John Hurliman | 2010-09-07 13:43:52 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-07 13:43:52 -0700 |
commit | 587bab79b400b0a66d1a21328145b3d46f0b5599 (patch) | |
tree | c6f87f47c24941e02ecbfc4a00a9c1fd06ac864b /OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |
parent | * Added sanity checks to the SimianAssetServiceConnector so it will throw a s... (diff) | |
parent | Fix Simian regression (diff) | |
download | opensim-SC_OLD-587bab79b400b0a66d1a21328145b3d46f0b5599.zip opensim-SC_OLD-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.gz opensim-SC_OLD-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.bz2 opensim-SC_OLD-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 074c80f..077be3c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
99 | 99 | ||
100 | public SimianPresenceServiceConnector(IConfigSource source) | 100 | public SimianPresenceServiceConnector(IConfigSource source) |
101 | { | 101 | { |
102 | Initialise(source); | 102 | CommonInit(source); |
103 | } | 103 | } |
104 | 104 | ||
105 | public void Initialise(IConfigSource source) | 105 | public void Initialise(IConfigSource source) |
@@ -109,24 +109,27 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
109 | { | 109 | { |
110 | string name = moduleConfig.GetString("PresenceServices", ""); | 110 | string name = moduleConfig.GetString("PresenceServices", ""); |
111 | if (name == Name) | 111 | if (name == Name) |
112 | CommonInit(source); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | private void CommonInit(IConfigSource source) | ||
117 | { | ||
118 | IConfig gridConfig = source.Configs["PresenceService"]; | ||
119 | if (gridConfig != null) | ||
120 | { | ||
121 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | ||
122 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
112 | { | 123 | { |
113 | IConfig gridConfig = source.Configs["PresenceService"]; | 124 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) |
114 | if (gridConfig != null) | 125 | serviceUrl = serviceUrl + '/'; |
115 | { | 126 | m_serverUrl = serviceUrl; |
116 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | 127 | m_Enabled = true; |
117 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
118 | { | ||
119 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
120 | serviceUrl = serviceUrl + '/'; | ||
121 | m_serverUrl = serviceUrl; | ||
122 | m_Enabled = true; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
127 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
128 | } | 128 | } |
129 | } | 129 | } |
130 | |||
131 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
132 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
130 | } | 133 | } |
131 | 134 | ||
132 | #region IPresenceService | 135 | #region IPresenceService |