From f8785b5f4720a0da7993ce6014e46cb8aaad308a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 30 Mar 2013 00:29:52 +0000
Subject: refactor: rename ETM.InformClientToInitateTeleportToLocationDelegate
to InformClientToInitiateTeleportToLocationDelegate to correct spelling and
bring into line with other ETM Initiate methods
---
.../Framework/EntityTransfer/EntityTransferModule.cs | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 764c982..3e69bf2 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1159,7 +1159,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
- InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
+ InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return true;
}
}
@@ -1182,7 +1182,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
- InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
+ InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return true;
}
@@ -1213,7 +1213,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
- InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
+ InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return true;
}
}
@@ -1243,7 +1243,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
- InformClientToInitateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
+ InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
return true;
}
}
@@ -1330,16 +1330,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
- public delegate void InformClientToInitateTeleportToLocationDelegate(ScenePresence agent, uint regionX, uint regionY,
+ public delegate void InformClientToInitiateTeleportToLocationDelegate(ScenePresence agent, uint regionX, uint regionY,
Vector3 position,
Scene initiatingScene);
- private void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene)
+ private void InformClientToInitiateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene)
{
// This assumes that we know what our neighbours are.
- InformClientToInitateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
+ InformClientToInitiateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
d.BeginInvoke(agent, regionX, regionY, position, initiatingScene,
InformClientToInitiateTeleportToLocationCompleted,
d);
@@ -1401,8 +1401,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar)
{
- InformClientToInitateTeleportToLocationDelegate icon =
- (InformClientToInitateTeleportToLocationDelegate)iar.AsyncState;
+ InformClientToInitiateTeleportToLocationDelegate icon =
+ (InformClientToInitiateTeleportToLocationDelegate)iar.AsyncState;
icon.EndInvoke(iar);
}
--
cgit v1.1
From 9fee431cc8a054dd4d6b20392cbefd0a0f8343f1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 30 Mar 2013 01:21:16 +0000
Subject: In the flotasm asset cache, if we get a request for a file that we're
actively writing, simply return null instead of first logging an exception.
---
.../Region/CoreModules/Asset/FlotsamAssetCache.cs | 52 +++++++++++-----------
1 file changed, 27 insertions(+), 25 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 3cba9b4..2afe065 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -341,11 +341,35 @@ namespace OpenSim.Region.CoreModules.Asset
///
/// An asset retrieved from the file cache. null if there was a problem retrieving an asset.
private AssetBase GetFromFileCache(string id)
- {
- AssetBase asset = null;
-
+ {
string filename = GetFileName(id);
+#if WAIT_ON_INPROGRESS_REQUESTS
+ // Check if we're already downloading this asset. If so, try to wait for it to
+ // download.
+ if (m_WaitOnInprogressTimeout > 0)
+ {
+ m_RequestsForInprogress++;
+
+ ManualResetEvent waitEvent;
+ if (m_CurrentlyWriting.TryGetValue(filename, out waitEvent))
+ {
+ waitEvent.WaitOne(m_WaitOnInprogressTimeout);
+ return Get(id);
+ }
+ }
+#else
+ // Track how often we have the problem that an asset is requested while
+ // it is still being downloaded by a previous request.
+ if (m_CurrentlyWriting.Contains(filename))
+ {
+ m_RequestsForInprogress++;
+ return null;
+ }
+#endif
+
+ AssetBase asset = null;
+
if (File.Exists(filename))
{
FileStream stream = null;
@@ -383,28 +407,6 @@ namespace OpenSim.Region.CoreModules.Asset
}
}
-#if WAIT_ON_INPROGRESS_REQUESTS
- // Check if we're already downloading this asset. If so, try to wait for it to
- // download.
- if (m_WaitOnInprogressTimeout > 0)
- {
- m_RequestsForInprogress++;
-
- ManualResetEvent waitEvent;
- if (m_CurrentlyWriting.TryGetValue(filename, out waitEvent))
- {
- waitEvent.WaitOne(m_WaitOnInprogressTimeout);
- return Get(id);
- }
- }
-#else
- // Track how often we have the problem that an asset is requested while
- // it is still being downloaded by a previous request.
- if (m_CurrentlyWriting.Contains(filename))
- {
- m_RequestsForInprogress++;
- }
-#endif
return asset;
}
--
cgit v1.1