aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting
diff options
context:
space:
mode:
authorUbitUmarov2017-06-24 05:22:02 +0100
committerUbitUmarov2017-06-24 05:22:02 +0100
commit72db6f76b5dc373d3178fbf09d04d385d63bc52d (patch)
tree6cca20efb046f21204c141e9fbabab02500ed167 /OpenSim/Region/CoreModules/Scripting
parentadd string osSetDynamicTextureDataFace(string dynamicID, string contentType, ... (diff)
downloadopensim-SC-72db6f76b5dc373d3178fbf09d04d385d63bc52d.zip
opensim-SC-72db6f76b5dc373d3178fbf09d04d385d63bc52d.tar.gz
opensim-SC-72db6f76b5dc373d3178fbf09d04d385d63bc52d.tar.bz2
opensim-SC-72db6f76b5dc373d3178fbf09d04d385d63bc52d.tar.xz
remove a DynamicTexture leak, make it actually return the new texture ID to ossl, do delete previus texture from local cache if temporary,at least on same cases... but still very broken..
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index c369d87..82596ca 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -135,16 +135,15 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
135 m_reuseableDynamicTextures.Store( 135 m_reuseableDynamicTextures.Store(
136 GenerateReusableTextureKey(texture.InputCommands, texture.InputParams), newTextureID); 136 GenerateReusableTextureKey(texture.InputCommands, texture.InputParams), newTextureID);
137 } 137 }
138 updater.newTextureID = newTextureID;
138 } 139 }
139 }
140 140
141 if (updater.UpdateTimer == 0) 141 if (updater.UpdateTimer == 0)
142 {
143 lock (Updaters)
144 { 142 {
145 if (!Updaters.ContainsKey(updater.UpdaterID)) 143 lock (Updaters)
146 { 144 {
147 Updaters.Remove(updater.UpdaterID); 145 if (Updaters.ContainsKey(updater.UpdaterID))
146 Updaters.Remove(updater.UpdaterID);
148 } 147 }
149 } 148 }
150 } 149 }
@@ -213,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
213 } 212 }
214 213
215 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); 214 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams);
216 return updater.UpdaterID; 215 return updater.newTextureID;
217 } 216 }
218 return UUID.Zero; 217 return UUID.Zero;
219 } 218 }
@@ -314,7 +313,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
314 updater.UpdatePart(part, (UUID)objReusableTextureUUID); 313 updater.UpdatePart(part, (UUID)objReusableTextureUUID);
315 } 314 }
316 315
317 return updater.UpdaterID; 316 return updater.newTextureID;
318 } 317 }
319 318
320 private string GenerateReusableTextureKey(string data, string extraParams) 319 private string GenerateReusableTextureKey(string data, string extraParams)
@@ -411,6 +410,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
411 public int Face; 410 public int Face;
412 public int Disp; 411 public int Disp;
413 public string Url; 412 public string Url;
413 public UUID newTextureID;
414 414
415 public DynamicTextureUpdater() 415 public DynamicTextureUpdater()
416 { 416 {
@@ -445,7 +445,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
445 { 445 {
446 try 446 try
447 { 447 {
448 Primitive.TextureEntryFace texface = tmptex.CreateFace((uint)Face); 448 Primitive.TextureEntryFace texface = tmptex.GetFace((uint)Face);
449 if(texface == null)
450 tmptex.GetFace((uint)Face);
451 else
452 {
453 if(texface.TextureID != null && texface.TextureID != UUID.Zero)
454 oldID = texface.TextureID;
455 }
449 texface.TextureID = textureID; 456 texface.TextureID = textureID;
450 tmptex.FaceTextures[Face] = texface; 457 tmptex.FaceTextures[Face] = texface;
451 } 458 }