aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorMW2007-10-29 14:37:08 +0000
committerMW2007-10-29 14:37:08 +0000
commit0837f6b78dbb93686ed3a3aca62a21566dfa8ccc (patch)
tree1c0579d09fc074fa45e60a77f1b5f7eee56dbedb /OpenSim/Framework/Communications/Cache
parent* Removed AssetNotFound as it crashes client (diff)
downloadopensim-SC-0837f6b78dbb93686ed3a3aca62a21566dfa8ccc.zip
opensim-SC-0837f6b78dbb93686ed3a3aca62a21566dfa8ccc.tar.gz
opensim-SC-0837f6b78dbb93686ed3a3aca62a21566dfa8ccc.tar.bz2
opensim-SC-0837f6b78dbb93686ed3a3aca62a21566dfa8ccc.tar.xz
fixed one bug (where the assets we read and created from the OpenSimAssetSet.xml file, weren't actually getting added to the database). This should make textures/assets work again with db4o, but still seems a problem with sqlite
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 53efa16..74f0167 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -163,6 +163,8 @@ namespace OpenSim.Framework.Communications.Cache
163 163
164 public void ForEachXmlAsset(Action<AssetBase> action) 164 public void ForEachXmlAsset(Action<AssetBase> action)
165 { 165 {
166 List<AssetBase> assets = new List<AssetBase>();
167 // System.Console.WriteLine("trying loading asset into database");
166 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); 168 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml");
167 if (File.Exists(filePath)) 169 if (File.Exists(filePath))
168 { 170 {
@@ -170,6 +172,7 @@ namespace OpenSim.Framework.Communications.Cache
170 172
171 for (int i = 0; i < source.Configs.Count; i++) 173 for (int i = 0; i < source.Configs.Count; i++)
172 { 174 {
175 // System.Console.WriteLine("loading asset into database");
173 string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); 176 string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated());
174 string name = source.Configs[i].GetString("name", ""); 177 string name = source.Configs[i].GetString("name", "");
175 sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0); 178 sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0);
@@ -180,9 +183,10 @@ namespace OpenSim.Framework.Communications.Cache
180 183
181 newAsset.Type = type; 184 newAsset.Type = type;
182 newAsset.InvType = invType; 185 newAsset.InvType = invType;
183 186 assets.Add(newAsset);
184 } 187 }
185 } 188 }
189 assets.ForEach(action);
186 } 190 }
187 } 191 }
188} 192}