diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 53efa162fb..74f0167dc9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -163,6 +163,8 @@ namespace OpenSim.Framework.Communications.Cache public void ForEachXmlAsset(Action action) { + List assets = new List(); + // System.Console.WriteLine("trying loading asset into database"); string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); if (File.Exists(filePath)) { @@ -170,6 +172,7 @@ namespace OpenSim.Framework.Communications.Cache for (int i = 0; i < source.Configs.Count; i++) { + // System.Console.WriteLine("loading asset into database"); string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); string name = source.Configs[i].GetString("name", ""); sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0); @@ -180,9 +183,10 @@ namespace OpenSim.Framework.Communications.Cache newAsset.Type = type; newAsset.InvType = invType; - + assets.Add(newAsset); } } + assets.ForEach(action); } } }