diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 645f4e8f16..c2b130cb88 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -826,3 +826,19 @@ ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
COMMIT;
+
+:VERSION 38 #---------------------
+
+BEGIN;
+
+alter table land ENGINE = MyISAM;
+alter table landaccesslist ENGINE = MyISAM;
+alter table migrations ENGINE = MyISAM;
+alter table primitems ENGINE = MyISAM;
+alter table prims ENGINE = MyISAM;
+alter table primshapes ENGINE = MyISAM;
+alter table regionban ENGINE = MyISAM;
+alter table regionsettings ENGINE = MyISAM;
+alter table terrain ENGINE = MyISAM;
+
+COMMIT;
\ No newline at end of file
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
index 6ba4c5a55e..931898ce10 100644
--- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
@@ -182,6 +182,9 @@ namespace OpenSim.Framework.Serialization.External
case "FixedSun":
settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString());
break;
+ case "SunPosition":
+ settings.SunPosition = double.Parse(xtr.ReadElementContentAsString());
+ break;
}
}
@@ -237,8 +240,9 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString());
xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString());
xtw.WriteElementString("FixedSun", settings.FixedSun.ToString());
- // XXX: Need to expose interface to get sun phase information from sun module
- // xtw.WriteStartElement("SunPhase",
+ xtw.WriteElementString("SunPosition", settings.SunPosition.ToString());
+ // Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which
+ // calculates it automatically according to the date and other factors.
xtw.WriteEndElement();
xtw.WriteEndElement();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index eed887811c..60485186e0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -438,6 +438,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Properties
+// ~LLClientView()
+// {
+// m_log.DebugFormat("[LLCLIENTVIEW]: Destructor called for {0}, circuit code {1}", Name, CircuitCode);
+// }
+
///
/// Constructor
///
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 7cba702298..9ef5bc95c3 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -64,13 +64,13 @@ namespace Flotsam.RegionModules.AssetCache
private bool m_Enabled;
private const string m_ModuleName = "FlotsamAssetCache";
- private const string m_DefaultCacheDirectory = m_ModuleName;
+ private const string m_DefaultCacheDirectory = "./assetcache";
private string m_CacheDirectory = m_DefaultCacheDirectory;
private readonly List m_InvalidChars = new List();
private int m_LogLevel = 0;
- private ulong m_HitRateDisplay = 1; // How often to display hit statistics, given in requests
+ private ulong m_HitRateDisplay = 100; // How often to display hit statistics, given in requests
private static ulong m_Requests;
private static ulong m_RequestsForInprogress;
@@ -87,14 +87,14 @@ namespace Flotsam.RegionModules.AssetCache
#endif
private ExpiringCache m_MemoryCache;
- private bool m_MemoryCacheEnabled = true;
+ private bool m_MemoryCacheEnabled = false;
// Expiration is expressed in hours.
- private const double m_DefaultMemoryExpiration = 1.0;
+ private const double m_DefaultMemoryExpiration = 2;
private const double m_DefaultFileExpiration = 48;
private TimeSpan m_MemoryExpiration = TimeSpan.FromHours(m_DefaultMemoryExpiration);
private TimeSpan m_FileExpiration = TimeSpan.FromHours(m_DefaultFileExpiration);
- private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.FromHours(m_DefaultFileExpiration);
+ private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.FromHours(0.166);
private static int m_CacheDirectoryTiers = 1;
private static int m_CacheDirectoryTierLen = 3;
@@ -141,26 +141,38 @@ namespace Flotsam.RegionModules.AssetCache
IConfig assetConfig = source.Configs["AssetCache"];
if (assetConfig == null)
{
- m_log.Warn("[FLOTSAM ASSET CACHE]: AssetCache missing from OpenSim.ini, using defaults.");
- m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);
- return;
+ m_log.Warn(
+ "[FLOTSAM ASSET CACHE]: AssetCache section missing from config (not copied config-include/FlotsamCache.ini.example? Using defaults.");
+ }
+ else
+ {
+ m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
+
+ m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", m_MemoryCacheEnabled);
+ m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration));
+
+ #if WAIT_ON_INPROGRESS_REQUESTS
+ m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
+ #endif
+
+ m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel);
+ m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay);
+
+ m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
+ m_FileExpirationCleanupTimer
+ = TimeSpan.FromHours(
+ assetConfig.GetDouble("FileCleanupTimer", m_FileExpirationCleanupTimer.TotalHours));
+
+ m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", m_CacheDirectoryTiers);
+ m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLength", m_CacheDirectoryTierLen);
+
+ m_CacheWarnAt = assetConfig.GetInt("CacheWarnAt", m_CacheWarnAt);
+
+ m_DeepScanBeforePurge = assetConfig.GetBoolean("DeepScanBeforePurge", m_DeepScanBeforePurge);
}
- m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
- m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_CacheDirectory);
+ m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory {0}", m_CacheDirectory);
- m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", false);
- m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration));
-
-#if WAIT_ON_INPROGRESS_REQUESTS
- m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
-#endif
-
- m_LogLevel = assetConfig.GetInt("LogLevel", 0);
- m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1000);
-
- m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
- m_FileExpirationCleanupTimer = TimeSpan.FromHours(assetConfig.GetDouble("FileCleanupTimer", m_DefaultFileExpiration));
if ((m_FileExpiration > TimeSpan.Zero) && (m_FileExpirationCleanupTimer > TimeSpan.Zero))
{
m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds);
@@ -170,7 +182,6 @@ namespace Flotsam.RegionModules.AssetCache
m_CacheCleanTimer.Start();
}
- m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", 1);
if (m_CacheDirectoryTiers < 1)
{
m_CacheDirectoryTiers = 1;
@@ -180,7 +191,6 @@ namespace Flotsam.RegionModules.AssetCache
m_CacheDirectoryTiers = 3;
}
- m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLength", 3);
if (m_CacheDirectoryTierLen < 1)
{
m_CacheDirectoryTierLen = 1;
@@ -190,14 +200,10 @@ namespace Flotsam.RegionModules.AssetCache
m_CacheDirectoryTierLen = 4;
}
- m_CacheWarnAt = assetConfig.GetInt("CacheWarnAt", 30000);
-
- m_DeepScanBeforePurge = assetConfig.GetBoolean("DeepScanBeforePurge", false);
-
- MainConsole.Instance.Commands.AddCommand(this.Name, true, "fcache status", "fcache status", "Display cache status", HandleConsoleCommand);
- MainConsole.Instance.Commands.AddCommand(this.Name, true, "fcache clear", "fcache clear [file] [memory]", "Remove all assets in the file and/or memory cache", HandleConsoleCommand);
- MainConsole.Instance.Commands.AddCommand(this.Name, true, "fcache assets", "fcache assets", "Attempt a deep scan and cache of all assets in all scenes", HandleConsoleCommand);
- MainConsole.Instance.Commands.AddCommand(this.Name, true, "fcache expire", "fcache expire ", "Purge cached assets older then the specified date/time", HandleConsoleCommand);
+ MainConsole.Instance.Commands.AddCommand(Name, true, "fcache status", "fcache status", "Display cache status", HandleConsoleCommand);
+ MainConsole.Instance.Commands.AddCommand(Name, true, "fcache clear", "fcache clear [file] [memory]", "Remove all assets in the cache. If file or memory is specified then only this cache is cleared.", HandleConsoleCommand);
+ MainConsole.Instance.Commands.AddCommand(Name, true, "fcache assets", "fcache assets", "Attempt a deep scan and cache of all assets in all scenes", HandleConsoleCommand);
+ MainConsole.Instance.Commands.AddCommand(Name, true, "fcache expire", "fcache expire ", "Purge cached assets older then the specified date/time", HandleConsoleCommand);
}
}
}
@@ -732,24 +738,39 @@ namespace Flotsam.RegionModules.AssetCache
break;
case "clear":
- if (cmdparams.Length < 3)
+ if (cmdparams.Length < 2)
{
- m_log.Warn("[FLOTSAM ASSET CACHE] Please specify memory and/or file cache.");
+ m_log.Warn("[FLOTSAM ASSET CACHE] Usage is fcache clear [file] [memory]");
break;
}
+
+ bool clearMemory = false, clearFile = false;
+
+ if (cmdparams.Length == 2)
+ {
+ clearMemory = true;
+ clearFile = true;
+ }
foreach (string s in cmdparams)
{
if (s.ToLower() == "memory")
- {
- m_MemoryCache.Clear();
- m_log.Info("[FLOTSAM ASSET CACHE] Memory cache cleared.");
- }
+ clearMemory = true;
else if (s.ToLower() == "file")
- {
- ClearFileCache();
- m_log.Info("[FLOTSAM ASSET CACHE] File cache cleared.");
- }
+ clearFile = true;
}
+
+ if (clearMemory)
+ {
+ m_MemoryCache.Clear();
+ m_log.Info("[FLOTSAM ASSET CACHE] Memory cache cleared.");
+ }
+
+ if (clearFile)
+ {
+ ClearFileCache();
+ m_log.Info("[FLOTSAM ASSET CACHE] File cache cleared.");
+ }
+
break;
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index b9d67193ab..40506a5aeb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -29,6 +29,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
+using System.Threading;
+
using log4net;
using Nini.Config;
using Nwc.XmlRpc;
@@ -194,46 +196,46 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
//}
- private void CollectOnlineFriendsElsewhere(UUID userID, List foreignFriends)
- {
- // let's divide the friends on a per-domain basis
- Dictionary> friendsPerDomain = new Dictionary>();
- foreach (string friend in foreignFriends)
- {
- UUID friendID;
- if (!UUID.TryParse(friend, out friendID))
- {
- // it's a foreign friend
- string url = string.Empty, tmp = string.Empty;
- if (Util.ParseUniversalUserIdentifier(friend, out friendID, out url, out tmp, out tmp, out tmp))
- {
- if (!friendsPerDomain.ContainsKey(url))
- friendsPerDomain[url] = new List();
- friendsPerDomain[url].Add(friend);
- }
- }
- }
+ //private void CollectOnlineFriendsElsewhere(UUID userID, List foreignFriends)
+ //{
+ // // let's divide the friends on a per-domain basis
+ // Dictionary> friendsPerDomain = new Dictionary>();
+ // foreach (string friend in foreignFriends)
+ // {
+ // UUID friendID;
+ // if (!UUID.TryParse(friend, out friendID))
+ // {
+ // // it's a foreign friend
+ // string url = string.Empty, tmp = string.Empty;
+ // if (Util.ParseUniversalUserIdentifier(friend, out friendID, out url, out tmp, out tmp, out tmp))
+ // {
+ // if (!friendsPerDomain.ContainsKey(url))
+ // friendsPerDomain[url] = new List();
+ // friendsPerDomain[url].Add(friend);
+ // }
+ // }
+ // }
- // Now, call those worlds
+ // // Now, call those worlds
- foreach (KeyValuePair> kvp in friendsPerDomain)
- {
- List ids = new List();
- foreach (string f in kvp.Value)
- ids.Add(f);
- UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
- List online = uConn.GetOnlineFriends(userID, ids);
- // Finally send the notifications to the user
- // this whole process may take a while, so let's check at every
- // iteration that the user is still here
- IClientAPI client = LocateClientObject(userID);
- if (client != null)
- client.SendAgentOnline(online.ToArray());
- else
- break;
- }
+ // foreach (KeyValuePair> kvp in friendsPerDomain)
+ // {
+ // List ids = new List();
+ // foreach (string f in kvp.Value)
+ // ids.Add(f);
+ // UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
+ // List online = uConn.GetOnlineFriends(userID, ids);
+ // // Finally send the notifications to the user
+ // // this whole process may take a while, so let's check at every
+ // // iteration that the user is still here
+ // IClientAPI client = LocateClientObject(userID);
+ // if (client != null)
+ // client.SendAgentOnline(online.ToArray());
+ // else
+ // break;
+ // }
- }
+ //}
protected override void StatusNotify(List friendList, UUID userID, bool online)
{
@@ -278,8 +280,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
List ids = new List();
foreach (FriendInfo f in kvp.Value)
ids.Add(f.Friend);
- UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
+ UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key, false);
List friendsOnline = uConn.StatusNotification(ids, userID, online);
+ Thread.Sleep(100);
// need to debug this here
if (online)
{
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index d6ef5df9a5..8858ad57c3 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -147,8 +147,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
base.AgentHasMovedAway(sp, logout);
if (logout)
+ {
// Log them out of this grid
m_aScene.PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
+ }
}
protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
@@ -285,7 +287,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
-
#endregion
#region IUserAgentVerificationModule
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index ae4336c88a..accd09443c 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -82,8 +82,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
// }
//}
MainConsole.Instance.Commands.AddCommand("grid", true,
- "show user-names",
- "show user-names",
+ "show names",
+ "show names",
"Show the bindings between user UUIDs and user names",
String.Empty,
HandleShowUsers);
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index f066f83540..0c60391fe2 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -41,7 +41,10 @@ namespace OpenSim.Region.CoreModules.Hypergrid
{
public class HGWorldMapModule : WorldMapModule
{
- //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ // Remember the map area that each client has been exposed to in this region
+ private Dictionary> m_SeenMapBlocks = new Dictionary>();
#region INonSharedRegionModule Members
@@ -52,6 +55,13 @@ namespace OpenSim.Region.CoreModules.Hypergrid
m_Enabled = true;
}
+ public override void AddRegion(Scene scene)
+ {
+ base.AddRegion(scene);
+
+ scene.EventManager.OnClientClosed += new EventManager.ClientClosed(EventManager_OnClientClosed);
+ }
+
public override string Name
{
get { return "HGWorldMap"; }
@@ -59,65 +69,70 @@ namespace OpenSim.Region.CoreModules.Hypergrid
#endregion
- protected override void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
+ void EventManager_OnClientClosed(UUID clientID, Scene scene)
{
- List mapBlocks = new List();
- List regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
- minX * (int)Constants.RegionSize, maxX * (int)Constants.RegionSize,
- minY * (int)Constants.RegionSize, maxY * (int)Constants.RegionSize);
-
- foreach (GridRegion r in regions)
+ ScenePresence sp = scene.GetScenePresence(clientID);
+ if (sp != null)
{
- uint x = 0, y = 0;
- long handle = 0;
- if (r.RegionSecret != null && r.RegionSecret != string.Empty)
+ if (m_SeenMapBlocks.ContainsKey(clientID))
{
- if (long.TryParse(r.RegionSecret, out handle))
+ List mapBlocks = m_SeenMapBlocks[clientID];
+ foreach (MapBlockData b in mapBlocks)
{
- Utils.LongToUInts((ulong)handle, out x, out y);
- x = x / Constants.RegionSize;
- y = y / Constants.RegionSize;
+ b.Name = string.Empty;
+ b.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's
}
- }
- if (handle == 0 ||
- // Check the distance from the current region
- (handle != 0 && Math.Abs((int)(x - m_scene.RegionInfo.RegionLocX)) < 4096 && Math.Abs((int)(y - m_scene.RegionInfo.RegionLocY)) < 4096))
- {
- MapBlockData block = new MapBlockData();
- MapBlockFromGridRegion(block, r);
- mapBlocks.Add(block);
+ m_log.DebugFormat("[HG MAP]: Reseting {0} blocks", mapBlocks.Count);
+ sp.ControllingClient.SendMapBlock(mapBlocks, 0);
+ m_SeenMapBlocks.Remove(clientID);
}
}
-
- // Different from super
- FillInMap(mapBlocks, minX, minY, maxX, maxY);
- //
-
- remoteClient.SendMapBlock(mapBlocks, 0);
-
}
-
- private void FillInMap(List mapBlocks, int minX, int minY, int maxX, int maxY)
+ protected override List GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{
- for (int x = minX; x <= maxX; x++)
+ List mapBlocks = base.GetAndSendBlocks(remoteClient, minX, minY, maxX, maxY, flag);
+ lock (m_SeenMapBlocks)
{
- for (int y = minY; y <= maxY; y++)
+ if (!m_SeenMapBlocks.ContainsKey(remoteClient.AgentId))
{
- MapBlockData mblock = mapBlocks.Find(delegate(MapBlockData mb) { return ((mb.X == x) && (mb.Y == y)); });
- if (mblock == null)
- {
- mblock = new MapBlockData();
- mblock.X = (ushort)x;
- mblock.Y = (ushort)y;
- mblock.Name = "";
- mblock.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's
- mblock.MapImageId = UUID.Zero;
- mapBlocks.Add(mblock);
- }
+ m_SeenMapBlocks.Add(remoteClient.AgentId, mapBlocks);
+ }
+ else
+ {
+ List seen = m_SeenMapBlocks[remoteClient.AgentId];
+ List newBlocks = new List();
+ foreach (MapBlockData b in mapBlocks)
+ if (seen.Find(delegate(MapBlockData bdata) { return bdata.X == b.X && bdata.Y == b.Y; }) == null)
+ newBlocks.Add(b);
+ seen.AddRange(newBlocks);
}
}
+
+ return mapBlocks;
+ }
+
+ }
+
+ class MapArea
+ {
+ public int minX;
+ public int minY;
+ public int maxX;
+ public int maxY;
+
+ public MapArea(int mix, int miy, int max, int may)
+ {
+ minX = mix;
+ minY = miy;
+ maxX = max;
+ maxY = may;
+ }
+
+ public void Print()
+ {
+ Console.WriteLine(String.Format(" --> Area is minX={0} minY={1} minY={2} maxY={3}", minX, minY, maxY, maxY));
}
}
}
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index d11d6775af..f85a91701c 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -506,6 +506,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
currentRegionSettings.Elevation2SE = loadedRegionSettings.Elevation2SE;
currentRegionSettings.Elevation2SW = loadedRegionSettings.Elevation2SW;
currentRegionSettings.FixedSun = loadedRegionSettings.FixedSun;
+ currentRegionSettings.SunPosition = loadedRegionSettings.SunPosition;
currentRegionSettings.ObjectBonus = loadedRegionSettings.ObjectBonus;
currentRegionSettings.RestrictPushing = loadedRegionSettings.RestrictPushing;
currentRegionSettings.TerrainLowerLimit = loadedRegionSettings.TerrainLowerLimit;
@@ -518,6 +519,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight;
currentRegionSettings.Save();
+
+ m_scene.TriggerEstateSunUpdate();
IEstateModule estateModule = m_scene.RequestModuleInterface();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 34e2e23a01..6ba3459747 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -440,6 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
rs.Elevation2SE = 9.2;
rs.Elevation2SW = 2.1;
rs.FixedSun = true;
+ rs.SunPosition = 12.0;
rs.ObjectBonus = 1.4;
rs.RestrictPushing = true;
rs.TerrainLowerLimit = 0.4;
@@ -485,6 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2));
Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1));
Assert.That(loadedRs.FixedSun, Is.True);
+ Assert.AreEqual(12.0, loadedRs.SunPosition);
Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4));
Assert.That(loadedRs.RestrictPushing, Is.True);
Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4));
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 3f6f359954..fc240d3e05 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -209,16 +209,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// path, param, agentID.ToString());
// There is a major hack going on in this method. The viewer doesn't request
- // map blocks (RequestMapBlocks) above 4096. That means that if we don't hack,
+ // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack,
// grids above that cell don't have a map at all. So, here's the hack: we wait
// for this CAP request to come, and we inject the map blocks at this point.
// In a normal scenario, this request simply sends back the MapLayer (the blue color).
// In the hacked scenario, it also sends the map blocks via UDP.
//
- // 6/8/2011 -- I'm adding an explicit 4096 check, so that we never forget that there is
+ // 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is
// a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks.
- if (m_scene.RegionInfo.RegionLocX >= 4096 || m_scene.RegionInfo.RegionLocY >= 4096)
+ if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048)
{
ScenePresence avatarPresence = null;
@@ -845,7 +845,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
}
}
- protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
+ protected virtual List GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{
List mapBlocks = new List();
List regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
@@ -860,6 +860,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
mapBlocks.Add(block);
}
remoteClient.SendMapBlock(mapBlocks, 0);
+
+ return mapBlocks;
}
protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r)
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index c0236f44c5..39d4a2950f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1584,7 +1584,7 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- ///
+ /// Handle a prim description set request from a viewer.
///
///
///
@@ -1601,8 +1601,17 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ ///
+ /// Set a click action for the prim.
+ ///
+ ///
+ ///
+ ///
protected internal void PrimClickAction(IClientAPI remoteClient, uint primLocalID, string clickAction)
{
+// m_log.DebugFormat(
+// "[SCENEGRAPH]: User {0} set click action for {1} to {2}", remoteClient.Name, primLocalID, clickAction);
+
SceneObjectGroup group = GetGroupByPrim(primLocalID);
if (group != null)
{
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 74d24a6884..482597df0f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -563,6 +563,11 @@ namespace OpenSim.Region.Framework.Scenes
#endregion
+// ~SceneObjectGroup()
+// {
+// m_log.DebugFormat("[SCENE OBJECT GROUP]: Destructor called for {0}, local id {1}", Name, LocalId);
+// }
+
#region Constructors
///
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index cb321aa36b..43dd8357aa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -357,6 +357,13 @@ namespace OpenSim.Region.Framework.Scenes
#endregion Fields
+// ~SceneObjectPart()
+// {
+// m_log.DebugFormat(
+// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}",
+// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId);
+// }
+
#region Constructors
///
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 5c284b9001..91740707d0 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1178,7 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture));
writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture));
writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture));
- writer.WriteElementString("A", sop.Color.G.ToString(Utils.EnUsCulture));
+ writer.WriteElementString("A", sop.Color.A.ToString(Utils.EnUsCulture));
writer.WriteEndElement();
writer.WriteElementString("Text", sop.Text);
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index f89b824614..99b2d8477a 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -303,7 +303,11 @@ namespace OpenSim.Region.Physics.Meshing
if (meshOsd is OSDMap)
{
OSDMap map = (OSDMap)meshOsd;
- OSDMap physicsParms = (OSDMap)map["physics_shape"];
+ OSDMap physicsParms = (OSDMap)map["physics_shape"]; // old asset format
+
+ if (physicsParms.Count == 0)
+ physicsParms = (OSDMap)map["physics_mesh"]; // new asset format
+
int physOffset = physicsParms["offset"].AsInteger() + (int)start;
int physSize = physicsParms["size"].AsInteger();
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 5028206e8b..6ed8a3fcd3 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -51,20 +51,31 @@ namespace OpenSim.Services.Connectors.Hypergrid
MethodBase.GetCurrentMethod().DeclaringType);
string m_ServerURL;
- public UserAgentServiceConnector(string url)
+
+ public UserAgentServiceConnector(string url) : this(url, true)
+ {
+ }
+
+ public UserAgentServiceConnector(string url, bool dnsLookup)
{
m_ServerURL = url;
- // Doing this here, because XML-RPC or mono have some strong ideas about
- // caching DNS translations.
- try
+
+ if (dnsLookup)
{
- Uri m_Uri = new Uri(m_ServerURL);
- IPAddress ip = Util.GetHostFromDNS(m_Uri.Host);
- m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); ;
- }
- catch (Exception e)
- {
- m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message);
+ // Doing this here, because XML-RPC or mono have some strong ideas about
+ // caching DNS translations.
+ try
+ {
+ Uri m_Uri = new Uri(m_ServerURL);
+ IPAddress ip = Util.GetHostFromDNS(m_Uri.Host);
+ m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString());
+ if (!m_ServerURL.EndsWith("/"))
+ m_ServerURL += "/";
+ }
+ catch (Exception e)
+ {
+ m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message);
+ }
}
m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0} ({1})", url, m_ServerURL);
}
@@ -423,7 +434,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
XmlRpcResponse response = null;
try
{
- response = request.Send(m_ServerURL, 10000);
+ response = request.Send(m_ServerURL, 4000);
}
catch (Exception e)
{
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 41d5a88642..ac535837cc 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -197,9 +197,11 @@ namespace OpenSim.Services.HypergridService
agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
// restore the old travel info
- if(reason != "Logins Disabled")
+ lock (m_TravelingAgents)
{
- lock (m_TravelingAgents)
+ if (old == null)
+ m_TravelingAgents.Remove(agentCircuit.SessionID);
+ else
m_TravelingAgents[agentCircuit.SessionID] = old;
}
diff --git a/OpenSim/Tests/Clients/Presence/OpenSim.Server.ini b/OpenSim/Tests/Clients/Presence/OpenSim.Server.ini
index 47e73f9887..8610c78a63 100644
--- a/OpenSim/Tests/Clients/Presence/OpenSim.Server.ini
+++ b/OpenSim/Tests/Clients/Presence/OpenSim.Server.ini
@@ -29,5 +29,5 @@ port = 8003
[PresenceService]
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
StorageProvider = "OpenSim.Data.MySQL.dll"
- ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
+ ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;Old Guids=true;"
diff --git a/OpenSim/Tests/Clients/UserAccounts/OpenSim.Server.ini b/OpenSim/Tests/Clients/UserAccounts/OpenSim.Server.ini
index eb1f47346a..453e17e65c 100644
--- a/OpenSim/Tests/Clients/UserAccounts/OpenSim.Server.ini
+++ b/OpenSim/Tests/Clients/UserAccounts/OpenSim.Server.ini
@@ -29,5 +29,5 @@ port = 8003
[UserAccountService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
StorageProvider = "OpenSim.Data.MySQL.dll"
- ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
+ ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;Old Guids=true;"
diff --git a/bin/config-include/CenomeCache.ini.example b/bin/config-include/CenomeCache.ini.example
index 8ef4e03bdc..4340493355 100644
--- a/bin/config-include/CenomeCache.ini.example
+++ b/bin/config-include/CenomeCache.ini.example
@@ -1,13 +1,14 @@
[AssetCache]
;;
- ;; Options for CenmoeAssetCache
+ ;; Options for CenomeAssetCache
;;
- ; 256 MB (default: 134217728)
- MaxSize = 268435456
+ ; Max size of the cache in bytes
+ ; 134217728 = 128 MB, 26843556 = 256 MB, etc (default: 134217728)
+ MaxSize = 134217728
- ; How many assets it is possible to store cache (default: 4096)
- MaxCount = 16384
+ ; How many assets it is possible to store in the cache (default: 4096)
+ MaxCount = 4096
- ; Expiration time - 1 hour (default: 30 minutes)
- ExpirationTime = 60
+ ; Expiration time in minutes (default: 30)
+ ExpirationTime = 30
diff --git a/bin/config-include/FlotsamCache.ini.example b/bin/config-include/FlotsamCache.ini.example
index 026dee718d..ad38ad15b5 100644
--- a/bin/config-include/FlotsamCache.ini.example
+++ b/bin/config-include/FlotsamCache.ini.example
@@ -29,7 +29,7 @@
; How long {in hours} to keep assets cached on disk, .5 == 30 minutes
; Specify 0 if you do not want your disk cache to expire
- FileCacheTimeout = 0
+ FileCacheTimeout = 48
; How often {in hours} should the disk be checked for expired filed
; Specify 0 to disable expiration checking
@@ -38,6 +38,7 @@
; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how
; long (in miliseconds) to block a request thread while trying to complete
; an existing write to disk.
+ ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE
; WaitOnInprogressTimeout = 3000
; Number of tiers to use for cache directories (current valid
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example
index e2e6459c58..27f262f374 100644
--- a/bin/config-include/GridCommon.ini.example
+++ b/bin/config-include/GridCommon.ini.example
@@ -10,9 +10,9 @@
; Uncomment these lines if you want to use mysql storage
; Change the connection string to your db details
;StorageProvider = "OpenSim.Data.MySQL.dll"
- ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
+ ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
; Uncomment this line if you are using MySQL and want to use a different database for estates
- ;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
+ ;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
; MSSQL
; Uncomment these lines if you want to use MSSQL storage