* Some asset loading refactoring
parent
44a7db0e44
commit
26b8018bcc
|
@ -61,6 +61,11 @@ namespace OpenSim.Framework.Communications.Caches
|
|||
|
||||
}
|
||||
|
||||
public SQLAssetServer( IAssetProvider assetProvider )
|
||||
{
|
||||
m_assetProviderPlugin = assetProvider;
|
||||
}
|
||||
|
||||
public void AddPlugin(string FileName)
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName);
|
||||
|
|
|
@ -101,15 +101,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
public void UpdateAsset(AssetBase asset)
|
||||
{
|
||||
MainLog.Instance.Verbose("AssetStorage",
|
||||
"Asset: " + asset.FullID +
|
||||
", Name: " + asset.Name +
|
||||
", Description: " + asset.Description +
|
||||
", Type: " + asset.Type +
|
||||
", InvType: " + asset.InvType +
|
||||
", Temporary: " + asset.Temporary +
|
||||
", Local: " + asset.Local +
|
||||
", Data Length: " + asset.Data.Length );
|
||||
LogAssetLoad(asset);
|
||||
|
||||
DataTable assets = ds.Tables["assets"];
|
||||
lock(ds) {
|
||||
DataRow row = assets.Rows.Find(asset.FullID);
|
||||
|
@ -126,6 +119,16 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
}
|
||||
|
||||
private void LogAssetLoad(AssetBase asset)
|
||||
{
|
||||
string temporary = asset.Temporary ? "Temporary" : "Stored";
|
||||
string local = asset.Local ? "Local" : "Remote";
|
||||
|
||||
MainLog.Instance.Verbose("ASSETSTORAGE",
|
||||
string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
|
||||
asset.FullID, asset.Name, asset.Description, asset.Type, asset.InvType, temporary, local, asset.Data.Length) );
|
||||
}
|
||||
|
||||
public bool ExistsAsset(LLUUID uuid)
|
||||
{
|
||||
DataRow row = ds.Tables["assets"].Rows.Find(uuid);
|
||||
|
|
Loading…
Reference in New Issue