From 2270b252656146d9d74b84665a7ace6c3139db30 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Thu, 31 Jul 2008 09:24:28 +0000
Subject: Thanks, sempuki, for a patch that moves all Grid Server's plugins to
PluginLoader. Fix issue 1871.
---
OpenSim/Data/MySQL/MySQLAssetData.cs | 2 +-
OpenSim/Data/MySQL/MySQLGridData.cs | 2 +-
OpenSim/Data/MySQL/MySQLInventoryData.cs | 20 +++++++++++++-------
OpenSim/Data/MySQL/MySQLUserData.cs | 23 ++++++++++++++++-------
4 files changed, 31 insertions(+), 16 deletions(-)
(limited to 'OpenSim/Data/MySQL')
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 9284ba9..cec736a 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Data.MySQL
override public void Dispose() { }
- #region IAssetProvider Members
+ #region IAssetProviderPlugin Members
///
///
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index fee457a..4cddbe5 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Data.MySQL
override public void Initialise()
{
- m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!");
+ m_log.Info("[MySQLGridData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 5bde40a..0fb49c1 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Data.MySQL
///
/// A MySQL interface for the inventory server
///
- public class MySQLInventoryData : IInventoryData
+ public class MySQLInventoryData : IInventoryDataPlugin
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -48,6 +48,12 @@ namespace OpenSim.Data.MySQL
///
private MySQLManager database;
+ public void Initialise()
+ {
+ m_log.Info("[MySQLInventoryData]: " + Name + " cannot be default-initialized!");
+ throw new PluginNotInitialisedException (Name);
+ }
+
///
/// Initialises Inventory interface
///
@@ -183,16 +189,16 @@ namespace OpenSim.Data.MySQL
/// The name of this DB provider
///
/// Name of DB provider
- public string getName()
+ public string Name
{
- return "MySQL Inventory Data Interface";
+ get { return "MySQL Inventory Data Interface"; }
}
///
/// Closes this DB provider
///
/// do nothing
- public void Close()
+ public void Dispose()
{
// Do nothing.
}
@@ -201,9 +207,9 @@ namespace OpenSim.Data.MySQL
/// Returns the version of this DB provider
///
/// A string containing the DB provider version
- public string getVersion()
+ public string Version
{
- return database.getVersion();
+ get { return database.getVersion(); }
}
///
@@ -692,7 +698,7 @@ namespace OpenSim.Data.MySQL
///
- /// See IInventoryData
+ /// See IInventoryDataPlugin
///
///
///
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 11d9c26..d8830de 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -55,6 +55,12 @@ namespace OpenSim.Data.MySQL
private string m_appearanceTableName = "avatarappearance";
private string m_connectString;
+ public override void Initialise()
+ {
+ m_log.Info("[MySQLUserData]: " + Name + " cannot be default-initialized!");
+ throw new PluginNotInitialisedException (Name);
+ }
+
///
/// Initialise User Interface
/// Loads and initialises the MySQL storage plugin
@@ -120,6 +126,9 @@ namespace OpenSim.Data.MySQL
m.Update();
}
+ public override void Dispose () { }
+
+
#region Test and initialization code
///
@@ -252,7 +261,7 @@ namespace OpenSim.Data.MySQL
UserProfileData row = database.readUserRow(reader);
- reader.Close();
+ reader.Dispose();
result.Dispose();
return row;
}
@@ -398,7 +407,7 @@ namespace OpenSim.Data.MySQL
Lfli.Add(fli);
}
- reader.Close();
+ reader.Dispose();
result.Dispose();
}
}
@@ -450,7 +459,7 @@ namespace OpenSim.Data.MySQL
user.lastName = (string) reader["lastname"];
returnlist.Add(user);
}
- reader.Close();
+ reader.Dispose();
result.Dispose();
}
}
@@ -484,7 +493,7 @@ namespace OpenSim.Data.MySQL
user.lastName = (string) reader["lastname"];
returnlist.Add(user);
}
- reader.Close();
+ reader.Dispose();
result.Dispose();
}
}
@@ -517,7 +526,7 @@ namespace OpenSim.Data.MySQL
UserProfileData row = database.readUserRow(reader);
- reader.Close();
+ reader.Dispose();
result.Dispose();
return row;
@@ -603,7 +612,7 @@ namespace OpenSim.Data.MySQL
UserAgentData row = database.readAgentRow(reader);
- reader.Close();
+ reader.Dispose();
result.Dispose();
return row;
@@ -725,7 +734,7 @@ namespace OpenSim.Data.MySQL
AvatarAppearance appearance = database.readAppearanceRow(reader);
- reader.Close();
+ reader.Dispose();
result.Dispose();
return appearance;
--
cgit v1.1