Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2011-06-11 12:08:02 +01:00
commit a1c16a4200
23 changed files with 275 additions and 163 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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);
// }
/// <summary>
/// Constructor
/// </summary>

View File

@ -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<char> m_InvalidChars = new List<char>();
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<string, AssetBase> 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 <datetime>", "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 <datetime>", "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;

View File

@ -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<string> foreignFriends)
{
// let's divide the friends on a per-domain basis
Dictionary<string, List<string>> friendsPerDomain = new Dictionary<string, List<string>>();
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<string>();
friendsPerDomain[url].Add(friend);
}
}
}
//private void CollectOnlineFriendsElsewhere(UUID userID, List<string> foreignFriends)
//{
// // let's divide the friends on a per-domain basis
// Dictionary<string, List<string>> friendsPerDomain = new Dictionary<string, List<string>>();
// 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<string>();
// friendsPerDomain[url].Add(friend);
// }
// }
// }
// Now, call those worlds
// // Now, call those worlds
foreach (KeyValuePair<string, List<string>> kvp in friendsPerDomain)
{
List<string> ids = new List<string>();
foreach (string f in kvp.Value)
ids.Add(f);
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
List<UUID> 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<string, List<string>> kvp in friendsPerDomain)
// {
// List<string> ids = new List<string>();
// foreach (string f in kvp.Value)
// ids.Add(f);
// UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
// List<UUID> 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<FriendInfo> friendList, UUID userID, bool online)
{
@ -278,8 +280,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
List<string> ids = new List<string>();
foreach (FriendInfo f in kvp.Value)
ids.Add(f.Friend);
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key, false);
List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online);
Thread.Sleep(100);
// need to debug this here
if (online)
{

View File

@ -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

View File

@ -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);

View File

@ -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<UUID, List<MapBlockData>> m_SeenMapBlocks = new Dictionary<UUID, List<MapBlockData>>();
#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<MapBlockData> mapBlocks = new List<MapBlockData>();
List<GridRegion> 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<MapBlockData> 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<MapBlockData> mapBlocks, int minX, int minY, int maxX, int maxY)
protected override List<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{
for (int x = minX; x <= maxX; x++)
List<MapBlockData> 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<MapBlockData> seen = m_SeenMapBlocks[remoteClient.AgentId];
List<MapBlockData> newBlocks = new List<MapBlockData>();
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));
}
}
}

View File

@ -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;
@ -519,6 +520,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
currentRegionSettings.Save();
m_scene.TriggerEstateSunUpdate();
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
if (estateModule != null)

View File

@ -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));

View File

@ -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<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{
List<MapBlockData> mapBlocks = new List<MapBlockData>();
List<GridRegion> 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)

View File

@ -1584,7 +1584,7 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
///
/// Handle a prim description set request from a viewer.
/// </summary>
/// <param name="primLocalID"></param>
/// <param name="description"></param>
@ -1601,8 +1601,17 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// Set a click action for the prim.
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="primLocalID"></param>
/// <param name="clickAction"></param>
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)
{

View File

@ -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
/// <summary>

View File

@ -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
/// <summary>

View File

@ -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);

View File

@ -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();

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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;"

View File

@ -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;"

View File

@ -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

View File

@ -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

View File

@ -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