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/SimianAssetServiceConnector.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/SimianAssetServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 37 |
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 |