aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs20
-rw-r--r--OpenSim/Services/GridService/GridService.cs8
2 files changed, 15 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 08b276d..41a3f52 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -288,23 +288,24 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
288 if (bakedTextures.Count == 0) 288 if (bakedTextures.Count == 0)
289 return false; 289 return false;
290 290
291 IImprovedAssetCache cache = sp.Scene.RequestModuleInterface<IImprovedAssetCache>();
292 if(cache == null)
293 return true; // no baked local caching so nothing to do
294
291 foreach (BakeType bakeType in bakedTextures.Keys) 295 foreach (BakeType bakeType in bakedTextures.Keys)
292 { 296 {
293 Primitive.TextureEntryFace bakedTextureFace = bakedTextures[bakeType]; 297 Primitive.TextureEntryFace bakedTextureFace = bakedTextures[bakeType];
294 298
295 if (bakedTextureFace == null) 299 if (bakedTextureFace == null)
296 {
297 // This can happen legitimately, since some baked textures might not exist
298 //m_log.WarnFormat(
299 // "[AV FACTORY]: No texture ID set for {0} for {1} in {2} not found when trying to save permanently",
300 // bakeType, sp.Name, m_scene.RegionInfo.RegionName);
301 continue; 300 continue;
302 }
303 301
304 AssetBase asset = m_scene.AssetService.Get(bakedTextureFace.TextureID.ToString()); 302 AssetBase asset = cache.Get(bakedTextureFace.TextureID.ToString());
305 303
306 if (asset != null) 304 if (asset != null && asset.Local)
307 { 305 {
306 // cache does not update asset contents
307 cache.Expire(bakedTextureFace.TextureID.ToString());
308
308 // Replace an HG ID with the simple asset ID so that we can persist textures for foreign HG avatars 309 // Replace an HG ID with the simple asset ID so that we can persist textures for foreign HG avatars
309 asset.ID = asset.FullID.ToString(); 310 asset.ID = asset.FullID.ToString();
310 311
@@ -312,7 +313,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
312 asset.Local = false; 313 asset.Local = false;
313 m_scene.AssetService.Store(asset); 314 m_scene.AssetService.Store(asset);
314 } 315 }
315 else 316
317 if (asset == null)
316 { 318 {
317 m_log.WarnFormat( 319 m_log.WarnFormat(
318 "[AV FACTORY]: Baked texture id {0} not found for bake {1} for avatar {2} in {3} when trying to save permanently", 320 "[AV FACTORY]: Baked texture id {0} not found for bake {1} for avatar {2} in {3} when trying to save permanently",
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 6b2dddf..a11cae1 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -341,7 +341,7 @@ namespace OpenSim.Services.GridService
341 341
342 return String.Empty; 342 return String.Empty;
343 } 343 }
344 344/*
345 /// <summary> 345 /// <summary>
346 /// Search the region map for regions conflicting with this region. 346 /// Search the region map for regions conflicting with this region.
347 /// The region to be added is passed and we look for any existing regions that are 347 /// The region to be added is passed and we look for any existing regions that are
@@ -433,7 +433,7 @@ namespace OpenSim.Services.GridService
433 // is the non-conflicting region found at the location being requested. 433 // is the non-conflicting region found at the location being requested.
434 return region; 434 return region;
435 } 435 }
436 436*/
437 // String describing name and region location of passed region 437 // String describing name and region location of passed region
438 private String RegionString(RegionData reg) 438 private String RegionString(RegionData reg)
439 { 439 {
@@ -548,8 +548,8 @@ namespace OpenSim.Services.GridService
548 } 548 }
549 else 549 else
550 { 550 {
551 m_log.DebugFormat("{0} GetRegionByPosition. Did not find region in database. Pos=<{1},{2}>", 551// m_log.DebugFormat("{0} GetRegionByPosition. Did not find region in database. Pos=<{1},{2}>",
552 LogHeader, regionX, regionY); 552// LogHeader, regionX, regionY);
553 return null; 553 return null;
554 } 554 }
555 } 555 }