Merge branch 'master' of /home/opensim/var/repo/opensim
commit
b699752fa9
|
@ -155,7 +155,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
private int m_defaultRTO = 0;
|
||||
private int m_maxRTO = 0;
|
||||
|
||||
private int m_ackTimeout = 0;
|
||||
private int m_pausedAckTimeout = 0;
|
||||
private bool m_disableFacelights = false;
|
||||
|
||||
public Socket Server { get { return null; } }
|
||||
|
@ -198,11 +199,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_defaultRTO = config.GetInt("DefaultRTO", 0);
|
||||
m_maxRTO = config.GetInt("MaxRTO", 0);
|
||||
m_disableFacelights = config.GetBoolean("DisableFacelights", false);
|
||||
m_ackTimeout = 1000 * config.GetInt("AckTimeout", 60);
|
||||
m_pausedAckTimeout = 1000 * config.GetInt("PausedAckTimeout", 300);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrimUpdatesPerCallback = 100;
|
||||
TextureSendLimit = 20;
|
||||
m_ackTimeout = 1000 * 60; // 1 minute
|
||||
m_pausedAckTimeout = 1000 * 300; // 5 minutes
|
||||
}
|
||||
|
||||
#region BinaryStats
|
||||
|
@ -491,8 +496,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return;
|
||||
|
||||
// Disconnect an agent if no packets are received for some time
|
||||
//FIXME: Make 60 an .ini setting
|
||||
if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60)
|
||||
int timeoutTicks = m_ackTimeout;
|
||||
|
||||
// Allow more slack if the client is "paused" eg file upload dialogue is open
|
||||
// Some sort of limit is needed in case the client crashes, loses its network connection
|
||||
// or some other disaster prevents it from sendung the AgentResume
|
||||
if (udpClient.IsPaused)
|
||||
timeoutTicks = m_pausedAckTimeout;
|
||||
|
||||
if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks)
|
||||
{
|
||||
m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
|
||||
StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
/// <summary>
|
||||
/// Is this module enabled?
|
||||
/// </summary>
|
||||
private bool enabledYN = false;
|
||||
private bool m_combineContiguousRegions = false;
|
||||
|
||||
/// <summary>
|
||||
/// This holds the root regions for the megaregions.
|
||||
|
@ -79,14 +79,12 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig myConfig = source.Configs["Startup"];
|
||||
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
||||
m_combineContiguousRegions = myConfig.GetBoolean("CombineContiguousRegions", false);
|
||||
|
||||
if (enabledYN)
|
||||
{
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"RegionCombinerModule", false, "fix-phantoms", "fix-phantoms",
|
||||
"Fixes phantom objects after an import to megaregions", FixPhantoms);
|
||||
}
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"RegionCombinerModule", false, "fix-phantoms", "fix-phantoms",
|
||||
"Fixes phantom objects after an import to a megaregion or a change from a megaregion back to normal regions",
|
||||
FixPhantoms);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -95,7 +93,7 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (enabledYN)
|
||||
if (m_combineContiguousRegions)
|
||||
scene.RegisterModuleInterface<IRegionCombinerModule>(this);
|
||||
}
|
||||
|
||||
|
@ -105,7 +103,10 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (enabledYN)
|
||||
lock (m_startingScenes)
|
||||
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
|
||||
|
||||
if (m_combineContiguousRegions)
|
||||
{
|
||||
RegionLoadedDoWork(scene);
|
||||
|
||||
|
@ -208,7 +209,6 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,8 +220,6 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
return;
|
||||
//
|
||||
*/
|
||||
lock (m_startingScenes)
|
||||
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
|
||||
|
||||
// Give each region a standard set of non-infinite borders
|
||||
Border northBorder = new Border();
|
||||
|
@ -1068,6 +1066,8 @@ namespace OpenSim.Region.RegionCombinerModule
|
|||
|
||||
foreach (Scene s in scenes)
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Fixing phantoms for {0}", s.RegionInfo.RegionName);
|
||||
|
||||
s.ForEachSOG(so => so.AbsolutePosition = so.AbsolutePosition);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -536,6 +536,19 @@
|
|||
;
|
||||
;DisableFacelights = false
|
||||
|
||||
; The time to wait before disconecting an unresponsive client.
|
||||
; The time is in seconds. The default is one minute
|
||||
;
|
||||
;AckTimeout = 60
|
||||
|
||||
; The time to wait before disconecting an unresponsive paused client.
|
||||
; A client can be paused when the file selection dialog is open during file upload.
|
||||
; This gives extra time to find files via the dialog but will still disconnect if
|
||||
; the client crashes or loses its network connection
|
||||
; The time is in seconds. The default is five minutes.
|
||||
;
|
||||
;PausedAckTimeout = 300
|
||||
|
||||
[ClientStack.LindenCaps]
|
||||
;; Long list of capabilities taken from
|
||||
;; http://wiki.secondlife.com/wiki/Current_Sim_Capabilities
|
||||
|
|
Loading…
Reference in New Issue