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/SimianInventoryServiceConnector.cs | |
parent | Simplify database setup and remove migration problems by moving all sqlite co... (diff) | |
download | opensim-SC_OLD-0b5141d45bcd409544e909aedabc3e58e6a86a13.zip opensim-SC_OLD-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.gz opensim-SC_OLD-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.bz2 opensim-SC_OLD-0b5141d45bcd409544e909aedabc3e58e6a86a13.tar.xz |
Fixed SimianGrid connectors to gracefully exit if the required config sections are missing
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 9879295..a50ecbc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
61 | /// Connects avatar inventories to the SimianGrid backend | 61 | /// Connects avatar inventories to the SimianGrid backend |
62 | /// </summary> | 62 | /// </summary> |
63 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 63 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
64 | public class SimianInventoryServiceConnector : IInventoryService | 64 | public class SimianInventoryServiceConnector : IInventoryService, ISharedRegionModule |
65 | { | 65 | { |
66 | private static readonly ILog m_log = | 66 | private static readonly ILog m_log = |
67 | LogManager.GetLogger( | 67 | LogManager.GetLogger( |
@@ -80,8 +80,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
80 | 80 | ||
81 | public SimianInventoryServiceConnector() { } | 81 | public SimianInventoryServiceConnector() { } |
82 | public string Name { get { return "SimianInventoryServiceConnector"; } } | 82 | public string Name { get { return "SimianInventoryServiceConnector"; } } |
83 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IInventoryService>(this); } | 83 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IInventoryService>(this); } } |
84 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IInventoryService>(this); } | 84 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IInventoryService>(this); } } |
85 | 85 | ||
86 | #endregion ISharedRegionModule | 86 | #endregion ISharedRegionModule |
87 | 87 | ||
@@ -95,8 +95,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
95 | IConfig gridConfig = source.Configs["InventoryService"]; | 95 | IConfig gridConfig = source.Configs["InventoryService"]; |
96 | if (gridConfig == null) | 96 | if (gridConfig == null) |
97 | { | 97 | { |
98 | m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); | 98 | m_log.Info("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini, skipping SimianInventoryServiceConnector"); |
99 | throw new Exception("Inventory connector init error"); | 99 | return; |
100 | } | 100 | } |
101 | 101 | ||
102 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); | 102 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); |