mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
This commit is contained in:
@@ -90,7 +90,7 @@ namespace OpenSim.Data.SQLite
|
||||
/// </summary>
|
||||
/// <param name="uuid">UUID of ... ?</param>
|
||||
/// <returns>Asset base</returns>
|
||||
override protected AssetBase FetchStoredAsset(UUID uuid)
|
||||
override public AssetBase GetAsset(UUID uuid)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
@@ -119,12 +119,28 @@ namespace OpenSim.Data.SQLite
|
||||
/// Create an asset
|
||||
/// </summary>
|
||||
/// <param name="asset">Asset Base</param>
|
||||
override public void CreateAsset(AssetBase asset)
|
||||
override public void StoreAsset(AssetBase asset)
|
||||
{
|
||||
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
||||
if (ExistsAsset(asset.FullID))
|
||||
{
|
||||
//m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
|
||||
LogAssetLoad(asset);
|
||||
|
||||
lock (this)
|
||||
{
|
||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -146,31 +162,6 @@ namespace OpenSim.Data.SQLite
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update an asset
|
||||
/// </summary>
|
||||
/// <param name="asset"></param>
|
||||
override public void UpdateAsset(AssetBase asset)
|
||||
{
|
||||
LogAssetLoad(asset);
|
||||
|
||||
lock (this)
|
||||
{
|
||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Some... logging functionnality
|
||||
/// </summary>
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace OpenSim.Data.SQLite
|
||||
/// </summary>
|
||||
/// <param name="profile">The profile to add</param>
|
||||
/// <returns>A dataresponse enum indicating success</returns>
|
||||
override public DataResponse AddProfile(RegionProfileData profile)
|
||||
override public DataResponse StoreProfile(RegionProfileData profile)
|
||||
{
|
||||
if (database.insertRow(profile))
|
||||
{
|
||||
@@ -215,17 +215,11 @@ namespace OpenSim.Data.SQLite
|
||||
}
|
||||
}
|
||||
|
||||
override public DataResponse UpdateProfile(RegionProfileData profile)
|
||||
{
|
||||
return AddProfile(profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Deletes a sim profile from the database
|
||||
/// </summary>
|
||||
/// <param name="uuid">the sim UUID</param>
|
||||
/// <returns>Successful?</returns>
|
||||
//public DataResponse DeleteProfile(RegionProfileData profile)
|
||||
override public DataResponse DeleteProfile(string uuid)
|
||||
{
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
|
||||
Reference in New Issue
Block a user