From 94684a2251a96df0ccbc45dbb12cd241a71978f8 Mon Sep 17 00:00:00 2001
From: Jonathan Freedman
Date: Wed, 20 Oct 2010 02:36:59 -0400
Subject: * remove some spurious debug info
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 13d9964..c223b4b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2976,6 +2976,8 @@ namespace OpenSim.Region.Framework.Scenes
public void CopyTo(AgentData cAgent)
{
+ cAgent.CallbackURI = m_callbackURI;
+
cAgent.AgentID = UUID;
cAgent.RegionID = Scene.RegionInfo.RegionID;
--
cgit v1.1
From d4144bedb81346301162f1e20266561fea7b621e Mon Sep 17 00:00:00 2001
From: Jonathan Freedman
Date: Thu, 21 Oct 2010 23:22:15 -0400
Subject: * change the data exchanged within hypergrid transactions
---
OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++-
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0cfc235..2750168 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3740,9 +3740,12 @@ namespace OpenSim.Region.Framework.Scenes
// We have to wait until the viewer contacts this region after receiving EAC.
// That calls AddNewClient, which finally creates the ScenePresence
+ m_log.Debug("ICADU -> pre wait");
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
+ m_log.Debug("ICADU -> post wait");
if (childAgentUpdate != null)
{
+ m_log.Debug("ICADU -> not child agent!");
childAgentUpdate.ChildAgentDataUpdate(cAgentData);
return true;
}
@@ -3758,7 +3761,7 @@ namespace OpenSim.Region.Framework.Scenes
/// true if we handled it.
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
{
- //m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
+ m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
{
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c223b4b..68ac178 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2925,7 +2925,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ChildAgentDataUpdate(AgentData cAgentData)
{
- //m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
+ m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
if (!IsChildAgent)
return;
--
cgit v1.1
From 700f4ddea49a416f5ec7a6a4f26454be93d5da91 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 22 Oct 2010 13:29:59 +0100
Subject: Change some exception to use ToString(). e.Message is not sufficient
to fix errors. Please don't use e.Message, devs NEED to see the dumps!
---
OpenSim/Region/Framework/Scenes/Scene.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ef18d02..4878b3e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2395,7 +2395,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- m_log.WarnFormat("[SCENE]: Problem casting object: {0}", e.Message);
+ m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString());
return false;
}
@@ -3347,7 +3347,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message);
+ m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
return false;
}
@@ -3358,7 +3358,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message);
+ m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString());
return false;
}
--
cgit v1.1
From 004b395d12b4e369005a4f4a0a44a86bd278e781 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 21 Oct 2010 15:36:32 +0100
Subject: Make SImStatsReporter pick ObjectCapacity striaght out of region info
---
OpenSim/Region/Framework/Scenes/Scene.cs | 2 --
OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 10 +++-------
2 files changed, 3 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0cfc235..c9ae558 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -599,8 +599,6 @@ namespace OpenSim.Region.Framework.Scenes
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
- StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity);
-
// Old
/*
m_simulatorVersion = simulatorVersion
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index fd23294..87dcdee 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_activeScripts = 0;
private int m_scriptLinesPerSecond = 0;
- private int objectCapacity = 45000;
+ private int m_objectCapacity = 45000;
private Scene m_scene;
@@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
m_scene = scene;
ReportingRegion = scene.RegionInfo;
+ m_objectCapacity = scene.RegionInfo.ObjectCapacity;
m_report.AutoReset = true;
m_report.Interval = statsUpdatesEveryMS;
m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat);
@@ -271,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes
SimStats simStats
= new SimStats(
- ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID);
+ ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID);
handlerSendStatResult = OnSendStatsResult;
if (handlerSendStatResult != null)
@@ -435,11 +436,6 @@ namespace OpenSim.Region.Framework.Scenes
m_activeScripts = count;
}
- public void SetObjectCapacity(int objects)
- {
- objectCapacity = objects;
- }
-
///
/// This is for llGetRegionFPS
///
--
cgit v1.1
From e06acae965d918ac0ece14a8aae2e1cf5be37d07 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 21 Oct 2010 22:04:31 +0100
Subject: Allow region modules to know which agents actually receive chat
---
OpenSim/Region/Framework/Scenes/EventManager.cs | 35 +++++++++++++++++++++++++
1 file changed, 35 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 437b91a..4feb3fc 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -293,6 +293,17 @@ namespace OpenSim.Region.Framework.Scenes
public event ChatFromClientEvent OnChatFromClient;
///
+ /// ChatToClientsEvent is triggered via ChatModule (or
+ /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a
+ /// received chat message if they satisfy various conditions (within audible range, etc.)
+ ///
+ public delegate void ChatToClientsEvent(
+ UUID senderID, HashSet receiverIDs,
+ string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
+ ChatSourceType src, ChatAudibleLevel level);
+ public event ChatToClientsEvent OnChatToClients;
+
+ ///
/// ChatBroadcastEvent is called via Scene when a broadcast chat message
/// from world comes in
///
@@ -1603,6 +1614,30 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
+
+ public void TriggerOnChatToClients(
+ UUID senderID, HashSet receiverIDs,
+ string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
+ ChatSourceType src, ChatAudibleLevel level)
+ {
+ ChatToClientsEvent handler = OnChatToClients;
+ if (handler != null)
+ {
+ foreach (ChatToClientsEvent d in handler.GetInvocationList())
+ {
+ try
+ {
+ d(senderID, receiverIDs, message, type, fromPos, fromName, src, level);
+ }
+ catch (Exception e)
+ {
+ m_log.ErrorFormat(
+ "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}",
+ e.Message, e.StackTrace);
+ }
+ }
+ }
+ }
public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
{
--
cgit v1.1
From fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 22 Oct 2010 23:52:07 +0100
Subject: Revert "Merge remote branch 'otakup0pe/mantis5110'"
This reverts commit 21187f459ea2ae590dda4249fa15ebf116d04fe0, reversing
changes made to 8f34e46d7449be1c29419a232a8f7f1e5918f03c.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 5 +----
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +---
2 files changed, 2 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ef18d02..c9ae558 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3738,12 +3738,9 @@ namespace OpenSim.Region.Framework.Scenes
// We have to wait until the viewer contacts this region after receiving EAC.
// That calls AddNewClient, which finally creates the ScenePresence
- m_log.Debug("ICADU -> pre wait");
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
- m_log.Debug("ICADU -> post wait");
if (childAgentUpdate != null)
{
- m_log.Debug("ICADU -> not child agent!");
childAgentUpdate.ChildAgentDataUpdate(cAgentData);
return true;
}
@@ -3759,7 +3756,7 @@ namespace OpenSim.Region.Framework.Scenes
/// true if we handled it.
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
{
- m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
+ //m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
{
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 68ac178..13d9964 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2925,7 +2925,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ChildAgentDataUpdate(AgentData cAgentData)
{
- m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
+ //m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
if (!IsChildAgent)
return;
@@ -2976,8 +2976,6 @@ namespace OpenSim.Region.Framework.Scenes
public void CopyTo(AgentData cAgent)
{
- cAgent.CallbackURI = m_callbackURI;
-
cAgent.AgentID = UUID;
cAgent.RegionID = Scene.RegionInfo.RegionID;
--
cgit v1.1
From 627d1a42fe11937a1c35659ca0fad6f89754f654 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 23 Oct 2010 20:39:41 -0700
Subject: Added inner exception handling in Shape deserialization processing,
so that the whole Shape processing returns a valid Shape object.
---
.../Scenes/Serialization/SceneObjectSerializer.cs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 044b599..95908fc 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
reader.ReadStartElement(name);
vec.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // X or x
- vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or Y
+ vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or y
vec.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Z or z
reader.ReadEndElement();
@@ -1501,15 +1501,28 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
reader.ReadStartElement(name, String.Empty); // Shape
+ string nodeName = string.Empty;
while (reader.NodeType != XmlNodeType.EndElement)
{
+ nodeName = reader.Name;
//m_log.DebugFormat("[XXX] Processing: {0}", reader.Name);
ShapeXmlProcessor p = null;
if (m_ShapeXmlProcessors.TryGetValue(reader.Name, out p))
- p(shape, reader);
+ {
+ try
+ {
+ p(shape, reader);
+ }
+ catch (Exception e)
+ {
+ m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing Shape {0}: {1}", nodeName, e);
+ if (reader.NodeType == XmlNodeType.EndElement)
+ reader.Read();
+ }
+ }
else
{
-// m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in Shape {0}", reader.Name);
+ // m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in Shape {0}", reader.Name);
reader.ReadOuterXml();
}
}
--
cgit v1.1
From a331fd4e24012a246bea9ac11689afe933e7968e Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Wed, 27 Oct 2010 00:01:03 -0400
Subject: Formatting cleanup.
---
OpenSim/Region/Framework/Scenes/EventManager.cs | 6 +++---
.../Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 4feb3fc..c321a15 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Framework.Scenes
/// ChatToClientsEvent is triggered via ChatModule (or
/// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a
/// received chat message if they satisfy various conditions (within audible range, etc.)
- ///
+ ///
public delegate void ChatToClientsEvent(
UUID senderID, HashSet receiverIDs,
string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
@@ -1636,8 +1636,8 @@ namespace OpenSim.Region.Framework.Scenes
e.Message, e.StackTrace);
}
}
- }
- }
+ }
+ }
public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
{
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 95908fc..e661ca9 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -804,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlTextReader reader)
{
byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry"));
- shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length);
+ shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length);
}
private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlTextReader reader)
--
cgit v1.1
From 5968d343bb21af4c73f1d925837560f953e5ef61 Mon Sep 17 00:00:00 2001
From: dahlia
Date: Tue, 26 Oct 2010 21:19:33 -0700
Subject: Overload Scene.NewUserConnection() to facilitate NPCs and other
region specific applications
---
OpenSim/Region/Framework/Scenes/Scene.cs | 36 ++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3dd0f3a..f0ae45e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3278,7 +3278,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
}
-
///
/// Do the work necessary to initiate a new user connection for a particular scene.
/// At the moment, this consists of setting up the caps infrastructure
@@ -3291,6 +3290,23 @@ namespace OpenSim.Region.Framework.Scenes
/// also return a reason.
public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
{
+ return NewUserConnection(agent, teleportFlags, out reason, true);
+ }
+
+ ///
+ /// Do the work necessary to initiate a new user connection for a particular scene.
+ /// At the moment, this consists of setting up the caps infrastructure
+ /// The return bool should allow for connections to be refused, but as not all calling paths
+ /// take proper notice of it let, we allowed banned users in still.
+ ///
+ /// CircuitData of the agent who is connecting
+ /// Outputs the reason for the false response on this string
+ /// True for normal presence. False for NPC
+ /// or other applications where a full grid/Hypergrid presence may not be required.
+ /// True if the region accepts this agent. False if it does not. False will
+ /// also return a reason.
+ public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup)
+ {
bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 ||
(teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0);
reason = String.Empty;
@@ -3339,16 +3355,18 @@ namespace OpenSim.Region.Framework.Scenes
if (sp == null) // We don't have an [child] agent here already
{
-
- try
+ if (requirePresenceLookup)
{
- if (!VerifyUserPresence(agent, out reason))
+ try
+ {
+ if (!VerifyUserPresence(agent, out reason))
+ return false;
+ }
+ catch (Exception e)
+ {
+ m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
return false;
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
- return false;
+ }
}
try
--
cgit v1.1
From 1fcac7203d0e92f735d10c42681768521d712ea5 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 27 Oct 2010 20:47:27 +0100
Subject: Prevent nullrefs in scene object deletion. Mantis #5156
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index f81c551..24d7334 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -406,11 +406,14 @@ namespace OpenSim.Region.Framework.Scenes
public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
{
EntityBase entity;
- if (!Entities.TryGetValue(uuid, out entity) && entity is SceneObjectGroup)
+ if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
return false;
SceneObjectGroup grp = (SceneObjectGroup)entity;
+ if (entity == null)
+ return false;
+
if (!resultOfObjectLinked)
{
m_numPrim -= grp.PrimCount;
--
cgit v1.1