diff options
author | John Hurliman | 2010-03-12 13:16:44 -0800 |
---|---|---|
committer | John Hurliman | 2010-03-12 13:16:44 -0800 |
commit | 0b5141d45bcd409544e909aedabc3e58e6a86a13 (patch) | |
tree | 6566ee2dd669e05584869436bc174590c37bbcd5 /OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |
parent | Simplify database setup and remove migration problems by moving all sqlite co... (diff) | |
download | opensim-SC-0b5141d45bcd409544e909aedabc3e58e6a86a13.zip opensim-SC-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.gz opensim-SC-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.bz2 opensim-SC-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.xz |
Fixed SimianGrid connectors to gracefully exit if the required config sections are missing
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 32f17ae..b3b171c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
60 | /// backend | 60 | /// backend |
61 | /// </summary> | 61 | /// </summary> |
62 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 62 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
63 | public class SimianProfiles | 63 | public class SimianProfiles : INonSharedRegionModule |
64 | { | 64 | { |
65 | private static readonly ILog m_log = | 65 | private static readonly ILog m_log = |
66 | LogManager.GetLogger( | 66 | LogManager.GetLogger( |
@@ -69,15 +69,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
69 | private string m_serverUrl = String.Empty; | 69 | private string m_serverUrl = String.Empty; |
70 | 70 | ||
71 | #region INonSharedRegionModule | 71 | #region INonSharedRegionModule |
72 | 72 | ||
73 | public Type ReplaceableInterface { get { return null; } } | 73 | public Type ReplaceableInterface { get { return null; } } |
74 | public void RegionLoaded(Scene scene) { } | 74 | public void RegionLoaded(Scene scene) { } |
75 | public void Close() { } | 75 | public void Close() { } |
76 | 76 | ||
77 | public SimianProfiles() { } | 77 | public SimianProfiles() { } |
78 | public string Name { get { return "SimianProfiles"; } } | 78 | public string Name { get { return "SimianProfiles"; } } |
79 | public void AddRegion(Scene scene) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } | 79 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } |
80 | public void RemoveRegion(Scene scene) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } | 80 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } |
81 | 81 | ||
82 | #endregion INonSharedRegionModule | 82 | #endregion INonSharedRegionModule |
83 | 83 | ||
@@ -91,8 +91,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | IConfig gridConfig = source.Configs["UserAccountService"]; | 91 | IConfig gridConfig = source.Configs["UserAccountService"]; |
92 | if (gridConfig == null) | 92 | if (gridConfig == null) |
93 | { | 93 | { |
94 | m_log.Error("[PROFILES]: UserAccountService missing from OpenSim.ini"); | 94 | m_log.Error("[PROFILES]: UserAccountService missing from OpenSim.ini, skipping SimianProfiles"); |
95 | throw new Exception("Profiles init error"); | 95 | return; |
96 | } | 96 | } |
97 | 97 | ||
98 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); | 98 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); |