aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSean Dague2009-02-18 13:15:07 +0000
committerSean Dague2009-02-18 13:15:07 +0000
commit8ed631307b97025bf25a5a08fa49223c3ad39eda (patch)
treeedfc91729dd7dc42534e5bcdd196d428469f099c /OpenSim/Region
parentFrom: Christopher Yeoh <yeohc@au1.ibm.com> (diff)
downloadopensim-SC-8ed631307b97025bf25a5a08fa49223c3ad39eda.zip
opensim-SC-8ed631307b97025bf25a5a08fa49223c3ad39eda.tar.gz
opensim-SC-8ed631307b97025bf25a5a08fa49223c3ad39eda.tar.bz2
opensim-SC-8ed631307b97025bf25a5a08fa49223c3ad39eda.tar.xz
From: Alan Webb <awebb@linux.vnet.ibm.com>
I've changed the extension point name, and the internal references that used the same string. I also fixed up the messaging around the asset loader so that it is more explicit.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs54
1 files changed, 35 insertions, 19 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index add7cb9..69ff2bd 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -59,7 +59,7 @@ namespace OpenSim
59 // class during system startup. 59 // class during system startup.
60 60
61 private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache"; 61 private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
62 private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetServerClient"; 62 private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
63 63
64 protected string proxyUrl; 64 protected string proxyUrl;
65 protected int proxyOffset = 0; 65 protected int proxyOffset = 0;
@@ -329,9 +329,9 @@ namespace OpenSim
329 protected virtual void InitialiseAssetCache() 329 protected virtual void InitialiseAssetCache()
330 { 330 {
331 331
332 LegacyAssetServerClientPluginInitialiser linit = null; 332 LegacyAssetClientPluginInitialiser linit = null;
333 CryptoAssetServerClientPluginInitialiser cinit = null; 333 CryptoAssetClientPluginInitialiser cinit = null;
334 AssetServerClientPluginInitialiser init = null; 334 AssetClientPluginInitialiser init = null;
335 335
336 IAssetServer assetServer = null; 336 IAssetServer assetServer = null;
337 string mode = m_configSettings.AssetStorage; 337 string mode = m_configSettings.AssetStorage;
@@ -358,7 +358,7 @@ namespace OpenSim
358 // of whether the server is standalone. 358 // of whether the server is standalone.
359 359
360 case "grid" : 360 case "grid" :
361 linit = new LegacyAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL); 361 linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
362 assetServer = loadAssetServer("Grid", linit); 362 assetServer = loadAssetServer("Grid", linit);
363 break; 363 break;
364 364
@@ -367,7 +367,7 @@ namespace OpenSim
367 // of whether the server is standalone. 367 // of whether the server is standalone.
368 368
369 case "cryptogrid" : 369 case "cryptogrid" :
370 cinit = new CryptoAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL, 370 cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
371 Environment.CurrentDirectory, true); 371 Environment.CurrentDirectory, true);
372 assetServer = loadAssetServer("Crypto", cinit); 372 assetServer = loadAssetServer("Crypto", cinit);
373 break; 373 break;
@@ -376,7 +376,7 @@ namespace OpenSim
376 // of whether the server is standalone. 376 // of whether the server is standalone.
377 377
378 case "cryptogrid_eou" : 378 case "cryptogrid_eou" :
379 cinit = new CryptoAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL, 379 cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
380 Environment.CurrentDirectory, false); 380 Environment.CurrentDirectory, false);
381 assetServer = loadAssetServer("Crypto", cinit); 381 assetServer = loadAssetServer("Crypto", cinit);
382 break; 382 break;
@@ -385,7 +385,7 @@ namespace OpenSim
385 // of whether the server is standalone. 385 // of whether the server is standalone.
386 386
387 case "file" : 387 case "file" :
388 linit = new LegacyAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL); 388 linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
389 assetServer = loadAssetServer("File", linit); 389 assetServer = loadAssetServer("File", linit);
390 break; 390 break;
391 391
@@ -403,7 +403,7 @@ namespace OpenSim
403 default : 403 default :
404 try 404 try
405 { 405 {
406 init = new AssetServerClientPluginInitialiser(m_configSettings); 406 init = new AssetClientPluginInitialiser(m_configSettings);
407 assetServer = loadAssetServer(m_configSettings.AssetStorage, init); 407 assetServer = loadAssetServer(m_configSettings.AssetStorage, init);
408 break; 408 break;
409 } 409 }
@@ -417,7 +417,7 @@ namespace OpenSim
417 417
418 if (assetServer == null) 418 if (assetServer == null)
419 { 419 {
420 init = new AssetServerClientPluginInitialiser(m_configSettings); 420 init = new AssetClientPluginInitialiser(m_configSettings);
421 SQLAssetServer sqlAssetServer = (SQLAssetServer) loadAssetServer("SQL", init); 421 SQLAssetServer sqlAssetServer = (SQLAssetServer) loadAssetServer("SQL", init);
422 sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile); 422 sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile);
423 assetServer = sqlAssetServer; 423 assetServer = sqlAssetServer;
@@ -437,15 +437,29 @@ namespace OpenSim
437 private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi) 437 private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi)
438 { 438 {
439 439
440 m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset server id={0}", id); 440 if(id != null && id != String.Empty)
441 {
442 m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset server id={0}", id);
441 443
442 PluginLoader<IAssetServer> loader = new PluginLoader<IAssetServer>(pi); 444 try
443 loader.AddFilter(PLUGIN_ASSET_SERVER_CLIENT, new PluginProviderFilter(id)); 445 {
444 loader.Load(PLUGIN_ASSET_SERVER_CLIENT); 446 PluginLoader<IAssetServer> loader = new PluginLoader<IAssetServer>(pi);
445 if (loader.Plugins.Count > 0) 447 loader.AddFilter(PLUGIN_ASSET_SERVER_CLIENT, new PluginProviderFilter(id));
446 return (IAssetServer) loader.Plugins[0]; 448 loader.Load(PLUGIN_ASSET_SERVER_CLIENT);
447 else 449
448 return null; 450 if (loader.Plugins.Count > 0)
451 {
452 m_log.DebugFormat("[OPENSIMBASE] Asset server {0} loaded", id);
453 return (IAssetServer) loader.Plugins[0];
454 }
455 }
456 catch (Exception e)
457 {
458 m_log.DebugFormat("[OPENSIMBASE] Asset server {0} not loaded ({1})", id, e.Message);
459 }
460 }
461
462 return null;
449 463
450 } 464 }
451 465
@@ -465,10 +479,12 @@ namespace OpenSim
465 479
466 IAssetCache assetCache = null; 480 IAssetCache assetCache = null;
467 481
468 m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset cache id={0}", m_configSettings.AssetCache);
469 482
470 if (m_configSettings.AssetCache != null && m_configSettings.AssetCache != String.Empty) 483 if (m_configSettings.AssetCache != null && m_configSettings.AssetCache != String.Empty)
471 { 484 {
485
486 m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset cache id={0}", m_configSettings.AssetCache);
487
472 try 488 try
473 { 489 {
474 490