aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-07 13:43:52 -0700
committerJohn Hurliman2010-09-07 13:43:52 -0700
commit587bab79b400b0a66d1a21328145b3d46f0b5599 (patch)
treec6f87f47c24941e02ecbfc4a00a9c1fd06ac864b /OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
parent* Added sanity checks to the SimianAssetServiceConnector so it will throw a s... (diff)
parentFix Simian regression (diff)
downloadopensim-SC-587bab79b400b0a66d1a21328145b3d46f0b5599.zip
opensim-SC-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.gz
opensim-SC-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.bz2
opensim-SC-587bab79b400b0a66d1a21328145b3d46f0b5599.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs37
1 files changed, 20 insertions, 17 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index caeabb7..8f601e8 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
81 81
82 public SimianAssetServiceConnector(IConfigSource source) 82 public SimianAssetServiceConnector(IConfigSource source)
83 { 83 {
84 Initialise(source); 84 CommonInit(source);
85 } 85 }
86 86
87 public void Initialise(IConfigSource source) 87 public void Initialise(IConfigSource source)
@@ -91,25 +91,28 @@ namespace OpenSim.Services.Connectors.SimianGrid
91 { 91 {
92 string name = moduleConfig.GetString("AssetServices", ""); 92 string name = moduleConfig.GetString("AssetServices", "");
93 if (name == Name) 93 if (name == Name)
94 { 94 CommonInit(source);
95 IConfig gridConfig = source.Configs["AssetService"]; 95 }
96 if (gridConfig != null) 96 }
97 {
98 string serviceUrl = gridConfig.GetString("AssetServerURI");
99 if (!String.IsNullOrEmpty(serviceUrl))
100 {
101 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
102 serviceUrl = serviceUrl + '/';
103 m_serverUrl = serviceUrl;
104 }
105 }
106 97
107 if (String.IsNullOrEmpty(m_serverUrl)) 98 private void CommonInit(IConfigSource source)
108 m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector"); 99 {
109 else 100 IConfig gridConfig = source.Configs["AssetService"];
110 m_Enabled = true; 101 if (gridConfig != null)
102 {
103 string serviceUrl = gridConfig.GetString("AssetServerURI");
104 if (!String.IsNullOrEmpty(serviceUrl))
105 {
106 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
107 serviceUrl = serviceUrl + '/';
108 m_serverUrl = serviceUrl;
111 } 109 }
112 } 110 }
111
112 if (String.IsNullOrEmpty(m_serverUrl))
113 m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector");
114 else
115 m_Enabled = true;
113 } 116 }
114 117
115 #region IAssetService 118 #region IAssetService