aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Resources/AssetCache.addin.xml10
-rw-r--r--OpenSim/Framework/IAssetServer.cs12
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs54
-rw-r--r--bin/OpenSim.addin.xml4
4 files changed, 48 insertions, 32 deletions
diff --git a/OpenSim/Framework/Communications/Resources/AssetCache.addin.xml b/OpenSim/Framework/Communications/Resources/AssetCache.addin.xml
index 61a9f0f..2ac6dca 100644
--- a/OpenSim/Framework/Communications/Resources/AssetCache.addin.xml
+++ b/OpenSim/Framework/Communications/Resources/AssetCache.addin.xml
@@ -8,10 +8,10 @@
8 <Extension path="/OpenSim/AssetCache"> 8 <Extension path="/OpenSim/AssetCache">
9 <Cache id="Default" provider="Default" type="OpenSim.Framework.Communications.Cache.AssetCache" /> 9 <Cache id="Default" provider="Default" type="OpenSim.Framework.Communications.Cache.AssetCache" />
10 </Extension> 10 </Extension>
11 <Extension path="/OpenSim/AssetServerClient"> 11 <Extension path="/OpenSim/AssetClient">
12 <ServerClient id="Crypto" provider="Crypto" type="OpenSim.Framework.Communications.Cache.CryptoGridAssetClient" /> 12 <AssetClient id="Crypto" provider="Crypto" type="OpenSim.Framework.Communications.Cache.CryptoGridAssetClient" />
13 <ServerClient id="Grid" provider="Grid" type="OpenSim.Framework.Communications.Cache.GridAssetClient" /> 13 <AssetClient id="Grid" provider="Grid" type="OpenSim.Framework.Communications.Cache.GridAssetClient" />
14 <ServerClient id="File" provider="File" type="OpenSim.Framework.Communications.Cache.FileAssetClient" /> 14 <AssetClient id="File" provider="File" type="OpenSim.Framework.Communications.Cache.FileAssetClient" />
15 <ServerClient id="SQL" provider="SQL" type="OpenSim.Framework.Communications.Cache.SQLAssetServer" /> 15 <AssetClient id="SQL" provider="SQL" type="OpenSim.Framework.Communications.Cache.SQLAssetServer" />
16 </Extension> 16 </Extension>
17</Addin> 17</Addin>
diff --git a/OpenSim/Framework/IAssetServer.cs b/OpenSim/Framework/IAssetServer.cs
index 0d9afe9..f76d125 100644
--- a/OpenSim/Framework/IAssetServer.cs
+++ b/OpenSim/Framework/IAssetServer.cs
@@ -65,11 +65,11 @@ namespace OpenSim.Framework
65 void AssetNotFound(UUID assetID, bool IsTexture); 65 void AssetNotFound(UUID assetID, bool IsTexture);
66 } 66 }
67 67
68 public class AssetServerClientPluginInitialiser : PluginInitialiserBase 68 public class AssetClientPluginInitialiser : PluginInitialiserBase
69 { 69 {
70 private ConfigSettings config; 70 private ConfigSettings config;
71 71
72 public AssetServerClientPluginInitialiser (ConfigSettings p_sv) 72 public AssetClientPluginInitialiser (ConfigSettings p_sv)
73 { 73 {
74 config = p_sv; 74 config = p_sv;
75 } 75 }
@@ -80,12 +80,12 @@ namespace OpenSim.Framework
80 } 80 }
81 } 81 }
82 82
83 public class LegacyAssetServerClientPluginInitialiser : PluginInitialiserBase 83 public class LegacyAssetClientPluginInitialiser : PluginInitialiserBase
84 { 84 {
85 private ConfigSettings config; 85 private ConfigSettings config;
86 private string assetURL; 86 private string assetURL;
87 87
88 public LegacyAssetServerClientPluginInitialiser (ConfigSettings p_sv, string p_url) 88 public LegacyAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url)
89 { 89 {
90 config = p_sv; 90 config = p_sv;
91 assetURL = p_url; 91 assetURL = p_url;
@@ -97,14 +97,14 @@ namespace OpenSim.Framework
97 } 97 }
98 } 98 }
99 99
100 public class CryptoAssetServerClientPluginInitialiser : PluginInitialiserBase 100 public class CryptoAssetClientPluginInitialiser : PluginInitialiserBase
101 { 101 {
102 private ConfigSettings config; 102 private ConfigSettings config;
103 private string assetURL; 103 private string assetURL;
104 private string currdir; 104 private string currdir;
105 private bool test; 105 private bool test;
106 106
107 public CryptoAssetServerClientPluginInitialiser (ConfigSettings p_sv, string p_url, string p_dir, bool p_test) 107 public CryptoAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url, string p_dir, bool p_test)
108 { 108 {
109 config = p_sv; 109 config = p_sv;
110 assetURL = p_url; 110 assetURL = p_url;
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
diff --git a/bin/OpenSim.addin.xml b/bin/OpenSim.addin.xml
index 707eaf3..82adfa6 100644
--- a/bin/OpenSim.addin.xml
+++ b/bin/OpenSim.addin.xml
@@ -9,7 +9,7 @@
9 <ExtensionPoint path="/OpenSim/AssetCache" name="Region Asset Cache Plugin-point" > 9 <ExtensionPoint path="/OpenSim/AssetCache" name="Region Asset Cache Plugin-point" >
10 <ExtensionNode name="Cache" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetCache"/> 10 <ExtensionNode name="Cache" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetCache"/>
11 </ExtensionPoint> 11 </ExtensionPoint>
12 <ExtensionPoint path="/OpenSim/AssetServerClient" name="Region Asset Cache Server Interface Plugin-point"> 12 <ExtensionPoint path="/OpenSim/AssetClient" name="Region Asset Cache Server Interface Plugin-point">
13 <ExtensionNode name="ServerClient" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetServer"/> 13 <ExtensionNode name="AssetClient" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetServer"/>
14 </ExtensionPoint> 14 </ExtensionPoint>
15</Addin> 15</Addin>