aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorlbsa712007-10-17 10:58:19 +0000
committerlbsa712007-10-17 10:58:19 +0000
commit26b8018bccbcb0f6a296adbb11bdc66733aa9e12 (patch)
tree9e738365af45ea60eabf36c8029b3874ba02fad6
parentRenamed SimProfileData to RegionProfileData (diff)
downloadopensim-SC_OLD-26b8018bccbcb0f6a296adbb11bdc66733aa9e12.zip
opensim-SC_OLD-26b8018bccbcb0f6a296adbb11bdc66733aa9e12.tar.gz
opensim-SC_OLD-26b8018bccbcb0f6a296adbb11bdc66733aa9e12.tar.bz2
opensim-SC_OLD-26b8018bccbcb0f6a296adbb11bdc66733aa9e12.tar.xz
* Some asset loading refactoring
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs5
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs21
2 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 082a240..35ec1cf 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -61,6 +61,11 @@ namespace OpenSim.Framework.Communications.Caches
61 61
62 } 62 }
63 63
64 public SQLAssetServer( IAssetProvider assetProvider )
65 {
66 m_assetProviderPlugin = assetProvider;
67 }
68
64 public void AddPlugin(string FileName) 69 public void AddPlugin(string FileName)
65 { 70 {
66 MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName); 71 MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName);
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index 922d714..0f3625b 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -101,15 +101,8 @@ namespace OpenSim.Framework.Data.SQLite
101 101
102 public void UpdateAsset(AssetBase asset) 102 public void UpdateAsset(AssetBase asset)
103 { 103 {
104 MainLog.Instance.Verbose("AssetStorage", 104 LogAssetLoad(asset);
105 "Asset: " + asset.FullID + 105
106 ", Name: " + asset.Name +
107 ", Description: " + asset.Description +
108 ", Type: " + asset.Type +
109 ", InvType: " + asset.InvType +
110 ", Temporary: " + asset.Temporary +
111 ", Local: " + asset.Local +
112 ", Data Length: " + asset.Data.Length );
113 DataTable assets = ds.Tables["assets"]; 106 DataTable assets = ds.Tables["assets"];
114 lock(ds) { 107 lock(ds) {
115 DataRow row = assets.Rows.Find(asset.FullID); 108 DataRow row = assets.Rows.Find(asset.FullID);
@@ -126,6 +119,16 @@ namespace OpenSim.Framework.Data.SQLite
126 } 119 }
127 } 120 }
128 121
122 private void LogAssetLoad(AssetBase asset)
123 {
124 string temporary = asset.Temporary ? "Temporary" : "Stored";
125 string local = asset.Local ? "Local" : "Remote";
126
127 MainLog.Instance.Verbose("ASSETSTORAGE",
128 string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
129 asset.FullID, asset.Name, asset.Description, asset.Type, asset.InvType, temporary, local, asset.Data.Length) );
130 }
131
129 public bool ExistsAsset(LLUUID uuid) 132 public bool ExistsAsset(LLUUID uuid)
130 { 133 {
131 DataRow row = ds.Tables["assets"].Rows.Find(uuid); 134 DataRow row = ds.Tables["assets"].Rows.Find(uuid);