diff options
author | Mike Mazur | 2009-02-16 02:27:34 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-16 02:27:34 +0000 |
commit | 529dd66ed01f598696ef8d20b465b911931d6fe8 (patch) | |
tree | 5bde49aaa0be88479d118b09c465af13538f1139 /OpenSim/Grid/AssetInventoryServer/Plugins | |
parent | - asset server functionality works with OpenSim's HttpServer (diff) | |
download | opensim-SC_OLD-529dd66ed01f598696ef8d20b465b911931d6fe8.zip opensim-SC_OLD-529dd66ed01f598696ef8d20b465b911931d6fe8.tar.gz opensim-SC_OLD-529dd66ed01f598696ef8d20b465b911931d6fe8.tar.bz2 opensim-SC_OLD-529dd66ed01f598696ef8d20b465b911931d6fe8.tar.xz |
- remove dependency on ExtensionLoader.dll (DBConnString.cs can go)
- bring config system in line with other servers
- add new plugin filter class which filters on ID
- update AssetInventoryServer.ini file
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/Plugins')
3 files changed, 19 insertions, 21 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs index e35092b..b7aef08 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs | |||
@@ -35,7 +35,6 @@ using MySql.Data.MySqlClient; | |||
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenMetaverse.StructuredData; | 36 | using OpenMetaverse.StructuredData; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Grid.AssetInventoryServer.Extensions; | ||
39 | using OpenSim.Data; | 38 | using OpenSim.Data; |
40 | 39 | ||
41 | namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | 40 | namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim |
@@ -58,7 +57,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
58 | metadata = null; | 57 | metadata = null; |
59 | BackendResponse ret; | 58 | BackendResponse ret; |
60 | 59 | ||
61 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 60 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.AssetDatabaseConnect)) |
62 | { | 61 | { |
63 | IDataReader reader; | 62 | IDataReader reader; |
64 | 63 | ||
@@ -104,7 +103,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
104 | assetData = null; | 103 | assetData = null; |
105 | BackendResponse ret; | 104 | BackendResponse ret; |
106 | 105 | ||
107 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 106 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.AssetDatabaseConnect)) |
108 | { | 107 | { |
109 | IDataReader reader; | 108 | IDataReader reader; |
110 | 109 | ||
@@ -156,7 +155,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
156 | { | 155 | { |
157 | BackendResponse ret; | 156 | BackendResponse ret; |
158 | 157 | ||
159 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 158 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.AssetDatabaseConnect)) |
160 | { | 159 | { |
161 | try | 160 | try |
162 | { | 161 | { |
@@ -205,7 +204,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
205 | { | 204 | { |
206 | int rowCount = 0; | 205 | int rowCount = 0; |
207 | 206 | ||
208 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 207 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.AssetDatabaseConnect)) |
209 | { | 208 | { |
210 | MySqlDataReader reader; | 209 | MySqlDataReader reader; |
211 | 210 | ||
@@ -255,7 +254,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
255 | 254 | ||
256 | try | 255 | try |
257 | { | 256 | { |
258 | m_assetProvider = DataPluginFactory.LoadDataPlugin<IAssetDataPlugin>("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null)); | 257 | m_assetProvider = DataPluginFactory.LoadDataPlugin<IAssetDataPlugin>("OpenSim.Data.MySQL.dll", server.ConfigFile.AssetDatabaseConnect); |
259 | if (m_assetProvider == null) | 258 | if (m_assetProvider == null) |
260 | { | 259 | { |
261 | Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting."); | 260 | Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting."); |
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs index a7d2f92..0ad6c80 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs | |||
@@ -35,7 +35,6 @@ using MySql.Data.MySqlClient; | |||
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenMetaverse.StructuredData; | 36 | using OpenMetaverse.StructuredData; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Grid.AssetInventoryServer.Extensions; | ||
39 | using OpenSim.Data; | 38 | using OpenSim.Data; |
40 | 39 | ||
41 | namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | 40 | namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim |
@@ -58,7 +57,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
58 | item = null; | 57 | item = null; |
59 | BackendResponse ret; | 58 | BackendResponse ret; |
60 | 59 | ||
61 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 60 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
62 | { | 61 | { |
63 | IDataReader reader; | 62 | IDataReader reader; |
64 | 63 | ||
@@ -120,7 +119,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
120 | folder = null; | 119 | folder = null; |
121 | BackendResponse ret; | 120 | BackendResponse ret; |
122 | 121 | ||
123 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 122 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
124 | { | 123 | { |
125 | IDataReader reader; | 124 | IDataReader reader; |
126 | 125 | ||
@@ -167,7 +166,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
167 | contents = null; | 166 | contents = null; |
168 | BackendResponse ret; | 167 | BackendResponse ret; |
169 | 168 | ||
170 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 169 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
171 | { | 170 | { |
172 | IDataReader reader; | 171 | IDataReader reader; |
173 | 172 | ||
@@ -267,7 +266,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
267 | 266 | ||
268 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 267 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
269 | { | 268 | { |
270 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 269 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
271 | { | 270 | { |
272 | IDataReader reader; | 271 | IDataReader reader; |
273 | 272 | ||
@@ -333,7 +332,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
333 | // Fetch inventory items | 332 | // Fetch inventory items |
334 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 333 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
335 | { | 334 | { |
336 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 335 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
337 | { | 336 | { |
338 | IDataReader reader; | 337 | IDataReader reader; |
339 | 338 | ||
@@ -405,7 +404,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
405 | 404 | ||
406 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 405 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
407 | { | 406 | { |
408 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 407 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
409 | { | 408 | { |
410 | IDataReader reader; | 409 | IDataReader reader; |
411 | 410 | ||
@@ -470,7 +469,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
470 | { | 469 | { |
471 | BackendResponse ret; | 470 | BackendResponse ret; |
472 | 471 | ||
473 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 472 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
474 | { | 473 | { |
475 | try | 474 | try |
476 | { | 475 | { |
@@ -537,7 +536,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
537 | { | 536 | { |
538 | BackendResponse ret; | 537 | BackendResponse ret; |
539 | 538 | ||
540 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 539 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
541 | { | 540 | { |
542 | try | 541 | try |
543 | { | 542 | { |
@@ -593,7 +592,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
593 | 592 | ||
594 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 593 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
595 | { | 594 | { |
596 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 595 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
597 | { | 596 | { |
598 | try | 597 | try |
599 | { | 598 | { |
@@ -639,7 +638,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
639 | 638 | ||
640 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 639 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
641 | { | 640 | { |
642 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 641 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
643 | { | 642 | { |
644 | try | 643 | try |
645 | { | 644 | { |
@@ -685,7 +684,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
685 | 684 | ||
686 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) | 685 | if (Utils.TryGetOpenSimUUID(owner, out ownerID)) |
687 | { | 686 | { |
688 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 687 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
689 | { | 688 | { |
690 | try | 689 | try |
691 | { | 690 | { |
@@ -739,7 +738,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
739 | { | 738 | { |
740 | int rowCount = 0; | 739 | int rowCount = 0; |
741 | 740 | ||
742 | using (MySqlConnection dbConnection = new MySqlConnection(DBConnString.GetConnectionString(server.ConfigFile))) | 741 | using (MySqlConnection dbConnection = new MySqlConnection(server.ConfigFile.InventoryDatabaseConnect)) |
743 | { | 742 | { |
744 | MySqlDataReader reader; | 743 | MySqlDataReader reader; |
745 | 744 | ||
@@ -789,7 +788,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
789 | 788 | ||
790 | try | 789 | try |
791 | { | 790 | { |
792 | m_inventoryProvider = DataPluginFactory.LoadDataPlugin<IInventoryDataPlugin>("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null)); | 791 | m_inventoryProvider = DataPluginFactory.LoadDataPlugin<IInventoryDataPlugin>("OpenSim.Data.MySQL.dll", server.ConfigFile.InventoryDatabaseConnect); |
793 | if (m_inventoryProvider == null) | 792 | if (m_inventoryProvider == null) |
794 | { | 793 | { |
795 | Logger.Log.Error("[INVENTORY]: Failed to load a database plugin, server halting."); | 794 | Logger.Log.Error("[INVENTORY]: Failed to load a database plugin, server halting."); |
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml b/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml index 67c4cd2..c1e5c4d 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml | |||
@@ -8,7 +8,7 @@ | |||
8 | </Dependencies> | 8 | </Dependencies> |
9 | 9 | ||
10 | <Extension path="/OpenSim/AssetInventoryServer/MetricsProvider"> | 10 | <Extension path="/OpenSim/AssetInventoryServer/MetricsProvider"> |
11 | <Plugin id="AssetInventoryMetrics" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.NullMetricsPlugin" /> | 11 | <Plugin id="NullMetrics" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.NullMetricsPlugin" /> |
12 | </Extension> | 12 | </Extension> |
13 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> | 13 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> |
14 | <Plugin id="BrowseFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.BrowseFrontendPlugin" /> | 14 | <Plugin id="BrowseFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.BrowseFrontendPlugin" /> |