aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2011-11-02 23:51:48 +0000
committerMelanie2011-11-02 23:51:48 +0000
commite746840226ca56a87d597c899f7c0bd8cf2980b2 (patch)
tree3eb405e222426a8d51dd9274275673ef34780a48 /OpenSim/Region/CoreModules
parentPort the Avination offline messaging system to Core (diff)
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC_OLD-e746840226ca56a87d597c899f7c0bd8cf2980b2.zip
opensim-SC_OLD-e746840226ca56a87d597c899f7c0bd8cf2980b2.tar.gz
opensim-SC_OLD-e746840226ca56a87d597c899f7c0bd8cf2980b2.tar.bz2
opensim-SC_OLD-e746840226ca56a87d597c899f7c0bd8cf2980b2.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs28
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs7
4 files changed, 30 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 236a47c..07d1cb3 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -169,6 +169,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
169 169
170 public bool SendAppearance(UUID agentId) 170 public bool SendAppearance(UUID agentId)
171 { 171 {
172// m_log.DebugFormat("[AVFACTORY]: Sending appearance for {0}", agentId);
173
172 ScenePresence sp = m_scene.GetScenePresence(agentId); 174 ScenePresence sp = m_scene.GetScenePresence(agentId);
173 if (sp == null) 175 if (sp == null)
174 { 176 {
@@ -257,7 +259,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
257 /// </summary> 259 /// </summary>
258 public void QueueAppearanceSend(UUID agentid) 260 public void QueueAppearanceSend(UUID agentid)
259 { 261 {
260 // m_log.WarnFormat("[AVFACTORY]: Queue appearance send for {0}", agentid); 262// m_log.DebugFormat("[AVFACTORY]: Queue appearance send for {0}", agentid);
261 263
262 // 10000 ticks per millisecond, 1000 milliseconds per second 264 // 10000 ticks per millisecond, 1000 milliseconds per second
263 long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 1000 * 10000); 265 long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 1000 * 10000);
@@ -393,10 +395,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
393 Dictionary<UUID, long> sends = new Dictionary<UUID, long>(m_sendqueue); 395 Dictionary<UUID, long> sends = new Dictionary<UUID, long>(m_sendqueue);
394 foreach (KeyValuePair<UUID, long> kvp in sends) 396 foreach (KeyValuePair<UUID, long> kvp in sends)
395 { 397 {
396 if (kvp.Value < now) 398 // We have to load the key and value into local parameters to avoid a race condition if we loop
399 // around and load kvp with a different value before FireAndForget has launched its thread.
400 UUID avatarID = kvp.Key;
401 long sendTime = kvp.Value;
402
403// m_log.DebugFormat("[AVFACTORY]: Handling queued appearance updates for {0}, update delta to now is {1}", avatarID, sendTime - now);
404
405 if (sendTime < now)
397 { 406 {
398 Util.FireAndForget(delegate(object o) { SendAppearance(kvp.Key); }); 407 Util.FireAndForget(o => SendAppearance(avatarID));
399 m_sendqueue.Remove(kvp.Key); 408 m_sendqueue.Remove(avatarID);
400 } 409 }
401 } 410 }
402 } 411 }
@@ -406,10 +415,15 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
406 Dictionary<UUID, long> saves = new Dictionary<UUID, long>(m_savequeue); 415 Dictionary<UUID, long> saves = new Dictionary<UUID, long>(m_savequeue);
407 foreach (KeyValuePair<UUID, long> kvp in saves) 416 foreach (KeyValuePair<UUID, long> kvp in saves)
408 { 417 {
409 if (kvp.Value < now) 418 // We have to load the key and value into local parameters to avoid a race condition if we loop
419 // around and load kvp with a different value before FireAndForget has launched its thread.
420 UUID avatarID = kvp.Key;
421 long sendTime = kvp.Value;
422
423 if (sendTime < now)
410 { 424 {
411 Util.FireAndForget(delegate(object o) { SaveAppearance(kvp.Key); }); 425 Util.FireAndForget(o => SaveAppearance(avatarID));
412 m_savequeue.Remove(kvp.Key); 426 m_savequeue.Remove(avatarID);
413 } 427 }
414 } 428 }
415 } 429 }
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 7324b26..7251bd8 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1714,7 +1714,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1714 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); 1714 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
1715 1715
1716 bool successYN = false; 1716 bool successYN = false;
1717 grp.RootPart.UpdateFlag = 0; 1717 grp.RootPart.ClearUpdateSchedule();
1718 //int primcrossingXMLmethod = 0; 1718 //int primcrossingXMLmethod = 0;
1719 1719
1720 if (destination != null) 1720 if (destination != null)
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 6075e19..f2c8b3d 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -395,9 +395,11 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
395 { 395 {
396 result = OpenJPEG.EncodeFromImage(joint, true); 396 result = OpenJPEG.EncodeFromImage(joint, true);
397 } 397 }
398 catch (Exception) 398 catch (Exception e)
399 { 399 {
400 m_log.Error("[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); 400 m_log.ErrorFormat(
401 "[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Exception {0}{1}",
402 e.Message, e.StackTrace);
401 } 403 }
402 404
403 return result; 405 return result;
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 7316e5b..c061868 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -338,10 +338,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
338 { 338 {
339 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); 339 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true);
340 } 340 }
341 catch (Exception) 341 catch (Exception e)
342 { 342 {
343 m_log.Error( 343 m_log.ErrorFormat(
344 "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); 344 "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Exception {0}{1}",
345 e.Message, e.StackTrace);
345 } 346 }
346 347
347 m_textureManager.ReturnData(id, imageJ2000); 348 m_textureManager.ReturnData(id, imageJ2000);