aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-03-12 13:16:44 -0800
committerJohn Hurliman2010-03-12 13:16:44 -0800
commit0b5141d45bcd409544e909aedabc3e58e6a86a13 (patch)
tree6566ee2dd669e05584869436bc174590c37bbcd5 /OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
parentSimplify database setup and remove migration problems by moving all sqlite co... (diff)
downloadopensim-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/SimianAssetServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 201bc70..89aa911 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
46 /// Connects to the SimianGrid asset service 46 /// Connects to the SimianGrid asset service
47 /// </summary> 47 /// </summary>
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
49 public class SimianAssetServiceConnector : IAssetService 49 public class SimianAssetServiceConnector : IAssetService, ISharedRegionModule
50 { 50 {
51 private static readonly ILog m_log = 51 private static readonly ILog m_log =
52 LogManager.GetLogger( 52 LogManager.GetLogger(
@@ -73,9 +73,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
73 73
74 public SimianAssetServiceConnector() { } 74 public SimianAssetServiceConnector() { }
75 public string Name { get { return "SimianAssetServiceConnector"; } } 75 public string Name { get { return "SimianAssetServiceConnector"; } }
76 public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IAssetService>(this); } 76 public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAssetService>(this); } }
77 public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IAssetService>(this); } 77 public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAssetService>(this); } }
78 78
79 #endregion ISharedRegionModule 79 #endregion ISharedRegionModule
80 80
81 public SimianAssetServiceConnector(IConfigSource source) 81 public SimianAssetServiceConnector(IConfigSource source)
@@ -88,8 +88,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
88 IConfig gridConfig = source.Configs["AssetService"]; 88 IConfig gridConfig = source.Configs["AssetService"];
89 if (gridConfig == null) 89 if (gridConfig == null)
90 { 90 {
91 m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); 91 m_log.Info("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini, skipping SimianAssetServiceConnector");
92 throw new Exception("Asset connector init error"); 92 return;
93 } 93 }
94 94
95 string serviceUrl = gridConfig.GetString("AssetServerURI"); 95 string serviceUrl = gridConfig.GetString("AssetServerURI");