From 0898be5750a9e5f0cfab566a34b65e4a227d82e6 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 31 Jan 2011 22:54:36 +0000
Subject: Change SimianGroupsServicesConnectorModule.GetAgentGroupMembership()
so that it returns null if the user isn't a member of the group.
This matches the behaviour of the same method for Flotsam Groups. This is the behaviour assumed by existing code.
Method doc also added to IGroupsServicesConnector to the make the contract clear.
---
.../XmlRpcGroups/IGroupsServicesConnector.cs | 19 +++++++
.../SimianGroupsServicesConnectorModule.cs | 66 +++++++++++-----------
2 files changed, 52 insertions(+), 33 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
index 5c779de..6d26075 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
@@ -63,7 +63,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
void SetAgentActiveGroupRole(UUID RequestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID);
void SetAgentGroupInfo(UUID RequestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile);
+ ///
+ /// Get information about a specific group to which the user belongs.
+ ///
+ /// The agent requesting the information.
+ /// The agent requested.
+ /// The group requested.
+ ///
+ /// If the user is a member of the group then the data structure is returned. If not, then null is returned.
+ ///
GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID);
+
+ ///
+ /// Get information about the groups to which a user belongs.
+ ///
+ /// The agent requesting the information.
+ /// The agent requested.
+ ///
+ /// Information about the groups to which the user belongs. If the user belongs to no groups then an empty
+ /// list is returned.
+ ///
List GetAgentGroupMemberships(UUID RequestingAgentID, UUID AgentID);
void AddGroupNotice(UUID RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
index 0d265f2..81725c5 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
@@ -704,7 +704,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
}
-
return findings;
}
@@ -712,54 +711,55 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{
if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
- GroupMembershipData data = new GroupMembershipData();
-
- ///////////////////////////////
- // Agent Specific Information:
- //
- OSDMap UserActiveGroup;
- if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup))
- {
- data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID);
- }
+ GroupMembershipData data = null;
+ bool foundData = false;
OSDMap UserGroupMemberInfo;
if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo))
{
+ data = new GroupMembershipData();
data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean();
- data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID();
+ data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID();
+
+ ///////////////////////////////
+ // Agent Specific Information:
+ //
+ OSDMap UserActiveGroup;
+ if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup))
+ {
+ data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID);
+ }
///////////////////////////////
// Role Specific Information:
//
-
OSDMap GroupRoleInfo;
if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo))
{
data.GroupTitle = GroupRoleInfo["Title"].AsString();
data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
- }
- }
-
- ///////////////////////////////
- // Group Specific Information:
- //
- OSDMap GroupInfo;
- string GroupName;
- if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
- {
- data.GroupID = groupID;
- data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
- data.Charter = GroupInfo["Charter"].AsString();
- data.FounderID = GroupInfo["FounderID"].AsUUID();
- data.GroupName = GroupName;
- data.GroupPicture = GroupInfo["InsigniaID"].AsUUID();
- data.MaturePublish = GroupInfo["MaturePublish"].AsBoolean();
- data.MembershipFee = GroupInfo["MembershipFee"].AsInteger();
- data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean();
- data.ShowInList = GroupInfo["ShowInList"].AsBoolean();
+ }
+
+ ///////////////////////////////
+ // Group Specific Information:
+ //
+ OSDMap GroupInfo;
+ string GroupName;
+ if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
+ {
+ data.GroupID = groupID;
+ data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
+ data.Charter = GroupInfo["Charter"].AsString();
+ data.FounderID = GroupInfo["FounderID"].AsUUID();
+ data.GroupName = GroupName;
+ data.GroupPicture = GroupInfo["InsigniaID"].AsUUID();
+ data.MaturePublish = GroupInfo["MaturePublish"].AsBoolean();
+ data.MembershipFee = GroupInfo["MembershipFee"].AsInteger();
+ data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean();
+ data.ShowInList = GroupInfo["ShowInList"].AsBoolean();
+ }
}
return data;
--
cgit v1.1
From 2344150b6e9dd056769f8ce565ec35243bef2538 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 2 Feb 2011 19:39:33 +0000
Subject: Stop double counting dequeued packets for packets sent number
This is already being incremented in LLUDPServer.SendPacketFinal for every packet
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index d4c3307..21bd99e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -441,13 +441,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// an outgoing packet from each, obeying the throttling bucket limits
///
///
+ ///
/// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower
/// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have
/// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the
/// wind queue).
///
- /// This function is only called from a synchronous loop in the
- /// UDPServer so we don't need to bother making this thread safe
+ /// This function is only called from a synchronous loop in the
+ /// UDPServer so we don't need to bother making this thread safe
+ ///
+ ///
/// True if any packets were sent, otherwise false
public bool DequeueOutgoing()
{
@@ -476,7 +479,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_udpServer.SendPacketFinal(nextPacket);
m_nextPackets[i] = null;
packetSent = true;
- this.PacketsSent++;
}
}
else
@@ -493,7 +495,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Send the packet
m_udpServer.SendPacketFinal(packet);
packetSent = true;
- this.PacketsSent++;
}
else
{
--
cgit v1.1
From 2413e9eb3fe63307660202f913eee1c877340372 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 2 Feb 2011 20:00:50 +0000
Subject: Record number of resent packets in LindenUDP stack and display in
stats report
---
.../Region/ClientStack/LindenUDP/LLUDPClient.cs | 7 +++++--
.../Region/ClientStack/LindenUDP/LLUDPServer.cs | 5 ++++-
.../Agent/UDP/Linden/LindenUDPInfoModule.cs | 24 ++++++++++++----------
3 files changed, 22 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 21bd99e..65a8fe3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -122,6 +122,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int PacketsReceived;
/// Number of packets sent to this client
public int PacketsSent;
+ /// Number of packets resent to this client
+ public int PacketsResent;
/// Total byte count of unacked packets sent to this client
public int UnackedBytes;
@@ -256,9 +258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string GetStats()
{
return string.Format(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
+ PacketsReceived,
PacketsSent,
- PacketsReceived,
+ PacketsResent,
UnackedBytes,
m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count,
m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count,
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index df8ddbb..5ff9aee 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -506,7 +506,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Bump up the resend count on this packet
Interlocked.Increment(ref outgoingPacket.ResendCount);
- //Interlocked.Increment(ref Stats.ResentPackets);
// Requeue or resend the packet
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, false))
@@ -582,6 +581,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
udpClient.NeedAcks.Add(outgoingPacket);
}
}
+ else
+ {
+ Interlocked.Increment(ref udpClient.PacketsResent);
+ }
#endregion Sequence Number Assignment
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 87d067c..6630edb 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -154,24 +154,26 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
report.AppendFormat(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n",
"Pkts",
"Pkts",
+ "Pkts",
"Bytes",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts");
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts");
report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
report.AppendFormat(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
- "Out",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n",
"In",
+ "Out",
+ "Resent",
"Unacked",
"Resend",
"Land",
--
cgit v1.1
From 4f7cf491e6fa06a6ac4672fa81e707437f3fa537 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 2 Feb 2011 20:02:10 +0000
Subject: Comment out texture CAPS 'texture not found' message for now
---
OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index 6fb8b46..df4d561 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -245,14 +245,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
WriteTextureData(httpRequest, httpResponse, texture, format);
return true;
}
-
}
// not found
- m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
+// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
return true;
-
}
private void WriteTextureData(OSHttpRequest request, OSHttpResponse response, AssetBase texture, string format)
--
cgit v1.1
From 8fdc810a2329063d136458dff5a4c7d307db3feb Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 3 Feb 2011 04:07:36 -0800
Subject: Addresses mantis #5360: CreatorData was being written as long as it
wasn't null. This made iars backwards incompatible when some items had
non-null foreign creators. This patch adds an explicit option (-c) to
preserve foreign creator information.
---
.../CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 1a96098..26edba4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -128,6 +128,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ " is the user's last name." + Environment.NewLine
+ " is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile= adds the url of the profile service to the saved user information." + Environment.NewLine
+ + "-c|--creators preserves information about foreign creators." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
+ " is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
@@ -396,6 +397,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
+ ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
List mainParams = ops.Parse(cmdparams);
--
cgit v1.1
From cf24069227f9a32272c873d4423e2e11f5da25a8 Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Thu, 3 Feb 2011 12:43:46 -0800
Subject: Change UpdateAgent (for changes in agent position) to be sent once to
each simulator rather than once to each region. This should help with some of
the delays caused by multiple outstanding requests to a single service point.
---
.../Simulation/LocalSimulationConnector.cs | 14 +++----
.../Framework/Scenes/SceneCommunicationService.cs | 43 +++++++++++-----------
2 files changed, 29 insertions(+), 28 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index c5972dd..56720b7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -225,17 +225,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
if (destination == null)
return false;
+ // We limit the number of messages sent for a position change to just one per
+ // simulator so when we receive the update we need to hand it to each of the
+ // scenes; scenes each check to see if the is a scene presence for the avatar
+ // note that we really don't need the GridRegion for this call
foreach (Scene s in m_sceneList)
{
- if (s.RegionInfo.RegionHandle == destination.RegionHandle)
- {
- //m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate");
- s.IncomingChildAgentDataUpdate(cAgentData);
- return true;
- }
+ //m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate");
+ s.IncomingChildAgentDataUpdate(cAgentData);
}
//m_log.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate");
- return false;
+ return true;
}
public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index f8ff308..837e655 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -193,7 +193,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle);
+ public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest);
+
///
/// This informs all neighboring regions about the settings of it's child agent.
@@ -202,31 +203,17 @@ namespace OpenSim.Region.Framework.Scenes
/// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc.
///
///
- private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle)
+ private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest)
{
//m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName);
try
{
- //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData);
- uint x = 0, y = 0;
- Utils.LongToUInts(regionHandle, out x, out y);
- GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
- m_scene.SimulationService.UpdateAgent(destination, cAgentData);
+ m_scene.SimulationService.UpdateAgent(dest, cAgentData);
}
catch
{
// Ignore; we did our best
}
-
- //if (regionAccepted)
- //{
- // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent");
- //}
- //else
- //{
- // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent");
- //}
-
}
private void SendChildAgentDataUpdateCompleted(IAsyncResult iar)
@@ -240,14 +227,28 @@ namespace OpenSim.Region.Framework.Scenes
// This assumes that we know what our neighbors are.
try
{
+ uint x = 0, y = 0;
+ List simulatorList = new List();
foreach (ulong regionHandle in presence.KnownChildRegionHandles)
{
if (regionHandle != m_regionInfo.RegionHandle)
{
- SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
- d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle,
- SendChildAgentDataUpdateCompleted,
- d);
+ // we only want to send one update to each simulator; the simulator will
+ // hand it off to the regions where a child agent exists, this does assume
+ // that the region position is cached or performance will degrade
+ Utils.LongToUInts(regionHandle, out x, out y);
+ GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
+ if (! simulatorList.Contains(dest.ServerURI))
+ {
+ // we havent seen this simulator before, add it to the list
+ // and send it an update
+ simulatorList.Add(dest.ServerURI);
+
+ SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
+ d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest,
+ SendChildAgentDataUpdateCompleted,
+ d);
+ }
}
}
}
--
cgit v1.1
From 1613d89383574f7bba3102376e6f3a2ee99b1270 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Feb 2011 20:51:51 +0000
Subject: minor: Correct misspelling of neighbour in log messages.
Thanks Fly-Man-
---
.../Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 54b95f7..80a8041 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
public void EnableChildAgent(ScenePresence sp, GridRegion region)
{
- m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighour {0}", region.RegionName);
+ m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighbour {0}", region.RegionName);
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
AgentCircuitData agent = sp.ControllingClient.RequestClientInfo();
--
cgit v1.1
From 034327b51fc496702b84b101123140b017bf68ff Mon Sep 17 00:00:00 2001
From: Kevin Cozens
Date: Thu, 3 Feb 2011 12:03:17 -0500
Subject: Send object date to viewer in microseconds (Fixes mantis bug #3990)
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 4fcd8f5..6a92378 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2055,8 +2055,9 @@ namespace OpenSim.Region.Framework.Scenes
public void GetProperties(IClientAPI client)
{
+ //Viewer wants date in microseconds so multiply it by 1,000,000.
client.SendObjectPropertiesReply(
- m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero,
+ m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero,
_groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask,
--
cgit v1.1
From 3585130ac8b805296323105a5b50c5d416210266 Mon Sep 17 00:00:00 2001
From: unknown
Date: Mon, 31 Jan 2011 02:42:22 -0500
Subject: SetTexture_fix
---
.../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 30fb252..38a16a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1750,13 +1750,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
UUID textureID=new UUID();
- if (!UUID.TryParse(texture, out textureID))
- {
- textureID=InventoryKey(texture, (int)AssetType.Texture);
- }
-
- if (textureID == UUID.Zero)
- return;
+ textureID=InventoryKey(texture, (int)AssetType.Texture);
+ if (textureID == UUID.Zero)
+ {
+ if (!UUID.TryParse(texture, out textureID))
+ return;
+ }
Primitive.TextureEntry tex = part.Shape.Textures;
--
cgit v1.1
From bc2e254b55b65cf267b8027e3e696acbc0f3c60b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Feb 2011 21:55:22 +0000
Subject: minor: fix indentation, spacing on commit 3585130
this previous commit tries to look up the texture by name first before just using the uuid.
this allows correct resolution of inventory textures which have uuids as names.
---
.../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 38a16a4..e8da274 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1748,14 +1748,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
protected void SetTexture(SceneObjectPart part, string texture, int face)
{
- UUID textureID=new UUID();
-
- textureID=InventoryKey(texture, (int)AssetType.Texture);
- if (textureID == UUID.Zero)
- {
- if (!UUID.TryParse(texture, out textureID))
- return;
- }
+ UUID textureID = new UUID();
+
+ textureID = InventoryKey(texture, (int)AssetType.Texture);
+ if (textureID == UUID.Zero)
+ {
+ if (!UUID.TryParse(texture, out textureID))
+ return;
+ }
Primitive.TextureEntry tex = part.Shape.Textures;
--
cgit v1.1
From 722f0ba18cbea725235f1c31cf3bd3d6a66def29 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Feb 2011 23:06:24 +0000
Subject: Put something in the ImprovedInstantMessage.BinaryBucket for
llInstantMessage() to stop this crashing viewer 2.4.0 (1.23.5 was fine with
this).
We're putting in a string of format " which appears to be the expected value.
This resolves http://opensimulator.org/mantis/view.php?id=5356
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e8da274..73fe160 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3063,12 +3063,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
msg.ParentEstateID = 0; //ParentEstateID;
msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
- msg.binaryBucket = new byte[0];// binaryBucket;
+ msg.binaryBucket
+ = Util.StringToBytes256(
+ "{0}/{1}/{2}/{3}",
+ World.RegionInfo.RegionName,
+ (int)Math.Floor(m_host.AbsolutePosition.X),
+ (int)Math.Floor(m_host.AbsolutePosition.Y),
+ (int)Math.Floor(m_host.AbsolutePosition.Z));
if (m_TransferModule != null)
{
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
}
+
ScriptSleep(2000);
}
--
cgit v1.1
From 5b7a5a5b8b6221b2fe42f645c757c2e5e9132aa6 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Feb 2011 23:14:21 +0000
Subject: Add position to IM sent from llInstantMessage(), to better fulfill
client expectations
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 73fe160..72ee495 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3061,7 +3061,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
msg.fromGroup = false;// fromGroup;
msg.offline = (byte)0; //offline;
msg.ParentEstateID = 0; //ParentEstateID;
- msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
+ msg.Position = new Vector3(m_host.AbsolutePosition);
msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
msg.binaryBucket
= Util.StringToBytes256(
--
cgit v1.1
From cdd64bb8f51df51858b841de4def7808735b02dd Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Feb 2011 00:15:25 +0000
Subject: For now, reinstate the call to World.GridService.GetRegionsByName()
commented out in 933f47e
Even though we don't use the results, just getting the regions may have side effects in making hypergrid links available for the later World.RequestTeleportLocation()
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index c0c790d..3f8735e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -702,7 +702,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// and convert the regionName to the target region
if (regionName.Contains(".") && regionName.Contains(":"))
{
-// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
+ World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
+// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
+
string[] parts = regionName.Split(new char[] { ':' });
if (parts.Length > 2)
regionName = parts[0] + ':' + parts[1] + "/ " + parts[2];
--
cgit v1.1
From f5a3eb9fd547df043b00a2934d891dcfff3142ab Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 4 Feb 2011 17:05:45 -0800
Subject: Added a config var to HGInventoryAccessModule called
OutboundPermission that controls whether the sim lets asset POSTs happen to
foreign grids or not. It's True by default. If ppl want to allow foreign
visitors but don't want to allow any assets out of their grid, they should
set this to False. This is the beginning of policies for these things...
---
.../Framework/InventoryAccess/HGInventoryAccessModule.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 34b8114..4565d10 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -55,6 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
private string m_ProfileServerURI;
+ private bool m_OutboundPermission;
// private bool m_Initialized = false;
@@ -78,7 +79,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
if (thisModuleConfig != null)
+ {
m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty);
+ m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
+ }
else
m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
}
@@ -103,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel)
{
string userAssetServer = string.Empty;
- if (IsForeignUser(avatarID, out userAssetServer))
+ if (IsForeignUser(avatarID, out userAssetServer) && m_OutboundPermission)
{
Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
}
@@ -197,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (IsForeignUser(sender, out userAssetServer))
m_assMapper.Get(item.AssetID, sender, userAssetServer);
- if (IsForeignUser(receiver, out userAssetServer))
+ if (IsForeignUser(receiver, out userAssetServer) && m_OutboundPermission)
m_assMapper.Post(item.AssetID, receiver, userAssetServer);
}
--
cgit v1.1
From 632babf8fba8180764b359b9716eaac904b1b4ac Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 4 Feb 2011 19:19:38 -0800
Subject: Added an additional debug message, and removed a bunch of files that
weren't being used anymore -- the old RemotsInventory connectors stuff.
---
.../Inventory/HGInventoryBroker.cs | 5 +
.../Inventory/RemoteInventoryServiceConnector.cs | 362 ---------------------
2 files changed, 5 insertions(+), 362 deletions(-)
delete mode 100644 OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index 39410b5..3f63db3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -200,6 +200,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return;
}
}
+ else
+ {
+ m_log.DebugFormat("[HG INVENTORY CONNECTOR]: User {0} does not have InventoryServerURI. OH NOES!", userID);
+ return;
+ }
}
}
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
deleted file mode 100644
index 9213132..0000000
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using log4net;
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using Nini.Config;
-using OpenSim.Framework;
-using OpenSim.Framework.Statistics;
-using OpenSim.Services.Connectors;
-using OpenSim.Region.Framework.Interfaces;
-using OpenSim.Region.Framework.Scenes;
-using OpenSim.Services.Interfaces;
-using OpenMetaverse;
-
-namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
-{
- public class RemoteInventoryServicesConnector : BaseInventoryConnector, ISharedRegionModule, IInventoryService
- {
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- private bool m_Enabled = false;
- private bool m_Initialized = false;
- private Scene m_Scene;
- private InventoryServicesConnector m_RemoteConnector;
-
- private IUserManagement m_UserManager;
- private IUserManagement UserManager
- {
- get
- {
- if (m_UserManager == null)
- {
- m_UserManager = m_Scene.RequestModuleInterface();
- }
- return m_UserManager;
- }
- }
-
-
- public Type ReplaceableInterface
- {
- get { return null; }
- }
-
- public string Name
- {
- get { return "RemoteInventoryServicesConnector"; }
- }
-
- public RemoteInventoryServicesConnector()
- {
- }
-
- public RemoteInventoryServicesConnector(IConfigSource source)
- {
- Init(source);
- }
-
- protected override void Init(IConfigSource source)
- {
- m_RemoteConnector = new InventoryServicesConnector(source);
- base.Init(source);
- }
-
- #region ISharedRegionModule
-
- public void Initialise(IConfigSource source)
- {
- IConfig moduleConfig = source.Configs["Modules"];
- if (moduleConfig != null)
- {
- string name = moduleConfig.GetString("InventoryServices", "");
- if (name == Name)
- {
- Init(source);
- m_Enabled = true;
-
- m_log.Info("[INVENTORY CONNECTOR]: Remote inventory enabled");
- }
- }
- }
-
- public void PostInitialise()
- {
- }
-
- public void Close()
- {
- }
-
- public void AddRegion(Scene scene)
- {
-// m_Scene = scene;
- //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName);
-
- if (!m_Enabled)
- return;
-
- if (!m_Initialized)
- {
- m_Initialized = true;
- }
-
- scene.RegisterModuleInterface(this);
- m_cache.AddRegion(scene);
-
- if (m_Scene == null)
- m_Scene = scene;
- }
-
- public void RemoveRegion(Scene scene)
- {
- if (!m_Enabled)
- return;
-
- m_cache.RemoveRegion(scene);
- }
-
- public void RegionLoaded(Scene scene)
- {
- if (!m_Enabled)
- return;
-
- m_log.InfoFormat("[INVENTORY CONNECTOR]: Enabled remote inventory for region {0}", scene.RegionInfo.RegionName);
-
- }
-
- #endregion ISharedRegionModule
-
- #region IInventoryService
-
- public override bool CreateUserInventory(UUID user)
- {
- return false;
- }
-
- public override List GetInventorySkeleton(UUID userId)
- {
- return new List();
- }
-
- public override InventoryCollection GetUserInventory(UUID userID)
- {
- return null;
- }
-
- public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
- {
- UUID sessionID = GetSessionID(userID);
- try
- {
- m_RemoteConnector.GetUserInventory(userID.ToString(), sessionID, callback);
- }
- catch (Exception e)
- {
- if (StatsManager.SimExtraStats != null)
- StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure();
-
- m_log.ErrorFormat("[INVENTORY CONNECTOR]: Request inventory operation failed, {0} {1}",
- e.Source, e.Message);
- }
-
- }
-
- // inherited. See base class
- // public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
-
- public override Dictionary GetSystemFolders(UUID userID)
- {
- UUID sessionID = GetSessionID(userID);
- return m_RemoteConnector.GetSystemFolders(userID.ToString(), sessionID);
- }
-
- public override InventoryCollection GetFolderContent(UUID userID, UUID folderID)
- {
- UUID sessionID = GetSessionID(userID);
- try
- {
- InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID);
- foreach (InventoryItemBase item in invCol.Items)
- UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
- return invCol;
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1}",
- e.Source, e.Message);
- }
- InventoryCollection nullCollection = new InventoryCollection();
- nullCollection.Folders = new List();
- nullCollection.Items = new List();
- nullCollection.UserID = userID;
- return nullCollection;
- }
-
- public override List GetFolderItems(UUID userID, UUID folderID)
- {
- UUID sessionID = GetSessionID(userID);
- return m_RemoteConnector.GetFolderItems(userID.ToString(), folderID, sessionID);
- }
-
- public override bool AddFolder(InventoryFolderBase folder)
- {
- if (folder == null)
- return false;
-
- UUID sessionID = GetSessionID(folder.Owner);
- return m_RemoteConnector.AddFolder(folder.Owner.ToString(), folder, sessionID);
- }
-
- public override bool UpdateFolder(InventoryFolderBase folder)
- {
- if (folder == null)
- return false;
-
- UUID sessionID = GetSessionID(folder.Owner);
- return m_RemoteConnector.UpdateFolder(folder.Owner.ToString(), folder, sessionID);
- }
-
- public override bool MoveFolder(InventoryFolderBase folder)
- {
- if (folder == null)
- return false;
-
- UUID sessionID = GetSessionID(folder.Owner);
- return m_RemoteConnector.MoveFolder(folder.Owner.ToString(), folder, sessionID);
- }
-
- public override bool DeleteFolders(UUID ownerID, List folderIDs)
- {
- if (folderIDs == null)
- return false;
- if (folderIDs.Count == 0)
- return false;
-
- UUID sessionID = GetSessionID(ownerID);
- return m_RemoteConnector.DeleteFolders(ownerID.ToString(), folderIDs, sessionID);
- }
-
-
- public override bool PurgeFolder(InventoryFolderBase folder)
- {
- if (folder == null)
- return false;
-
- UUID sessionID = GetSessionID(folder.Owner);
- return m_RemoteConnector.PurgeFolder(folder.Owner.ToString(), folder, sessionID);
- }
-
- // public bool AddItem(InventoryItemBase item) inherited
- // Uses AddItemPlain
-
- protected override bool AddItemPlain(InventoryItemBase item)
- {
- if (item == null)
- return false;
-
- UUID sessionID = GetSessionID(item.Owner);
- return m_RemoteConnector.AddItem(item.Owner.ToString(), item, sessionID);
- }
-
- public override bool UpdateItem(InventoryItemBase item)
- {
- if (item == null)
- return false;
-
- UUID sessionID = GetSessionID(item.Owner);
- return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID);
- }
-
- public override bool MoveItems(UUID ownerID, List items)
- {
- if (items == null)
- return false;
-
- UUID sessionID = GetSessionID(ownerID);
- return m_RemoteConnector.MoveItems(ownerID.ToString(), items, sessionID);
- }
-
-
- public override bool DeleteItems(UUID ownerID, List itemIDs)
- {
- if (itemIDs == null)
- return false;
- if (itemIDs.Count == 0)
- return true;
-
- UUID sessionID = GetSessionID(ownerID);
- return m_RemoteConnector.DeleteItems(ownerID.ToString(), itemIDs, sessionID);
- }
-
- public override InventoryItemBase GetItem(InventoryItemBase item)
- {
- if (item == null)
- return null;
-
- UUID sessionID = GetSessionID(item.Owner);
- return m_RemoteConnector.QueryItem(item.Owner.ToString(), item, sessionID);
- }
-
- public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
- {
- if (folder == null)
- return null;
-
- UUID sessionID = GetSessionID(folder.Owner);
- return m_RemoteConnector.QueryFolder(folder.Owner.ToString(), folder, sessionID);
- }
-
- public override bool HasInventoryForUser(UUID userID)
- {
- return false;
- }
-
- public override List GetActiveGestures(UUID userId)
- {
- return new List();
- }
-
- public override int GetAssetPermissions(UUID userID, UUID assetID)
- {
- UUID sessionID = GetSessionID(userID);
- return m_RemoteConnector.GetAssetPermissions(userID.ToString(), assetID, sessionID);
- }
-
-
- #endregion
-
- private UUID GetSessionID(UUID userID)
- {
- return UUID.Zero;
- }
-
- }
-}
--
cgit v1.1
From 67555994adc6b5449a0a1c21997e7bfcf880ad02 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 07:55:54 -0800
Subject: Amend to yesterday's deletions: forgot to delete the RemoteInventory
module in th addin.xml file.
---
OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 43de2ab..a9d247a 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -47,7 +47,6 @@
-
--
cgit v1.1
From b20ab1063f5717a69fb3226c44b4af5228280d35 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 17:57:30 -0800
Subject: Added a couple of console commands to help diagnose issues: show
circuits: shows the lists of agent circuit data show http-handlers: shows the
currently registered http handlers
---
OpenSim/Region/Application/OpenSim.cs | 50 +++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index ed4b620..bbcc588 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -294,6 +294,14 @@ namespace OpenSim
"show connections",
"Show connection data", HandleShow);
+ m_console.Commands.AddCommand("region", false, "show circuits",
+ "show circuits",
+ "Show agent circuit data", HandleShow);
+
+ m_console.Commands.AddCommand("region", false, "show http-handlers",
+ "show http-handlers",
+ "Show all registered http handlers", HandleShow);
+
m_console.Commands.AddCommand("region", false, "show modules",
"show modules",
"Show module data", HandleShow);
@@ -943,6 +951,48 @@ namespace OpenSim
MainConsole.Instance.Output(connections.ToString());
break;
+ case "circuits":
+ System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n");
+ m_sceneManager.ForEachScene(
+ delegate(Scene scene)
+ {
+ //this.HttpServer.
+ acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
+ foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
+ acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
+ }
+ );
+
+ MainConsole.Instance.Output(acd.ToString());
+ break;
+
+ case "http-handlers":
+ System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n");
+
+ handlers.AppendFormat("* XMLRPC:\n");
+ foreach (String s in HttpServer.GetXmlRpcHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* HTTP:\n");
+ List poll = HttpServer.GetPollServiceHandlerKeys();
+ foreach (String s in HttpServer.GetHTTPHandlerKeys())
+ handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
+
+ handlers.AppendFormat("* Agent:\n");
+ foreach (String s in HttpServer.GetAgentHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* LLSD:\n");
+ foreach (String s in HttpServer.GetLLSDHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count);
+ foreach (String s in HttpServer.GetStreamHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ MainConsole.Instance.Output(handlers.ToString());
+ break;
+
case "modules":
MainConsole.Instance.Output("The currently loaded shared modules are:");
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
--
cgit v1.1
From 30fa5ad1e29df50de99611b43adfd577696bfdda Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:21:12 -0800
Subject: One more diagnosis command: show caps
---
.../Agent/Capabilities/CapabilitiesModule.cs | 28 +++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index c023a6f..75df6cc 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -26,12 +26,14 @@
*/
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using Caps=OpenSim.Framework.Capabilities.Caps;
@@ -61,6 +63,10 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
{
m_scene = scene;
m_scene.RegisterModuleInterface(this);
+ MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
+ "show capabilities",
+ "Shows all registered capabilities", CapabilitiesCommand);
+ m_log.Error("\n\n**************************************************************\n\n");
}
public void RegionLoaded(Scene scene)
@@ -72,7 +78,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
m_scene.UnregisterModuleInterface(this);
}
- public void PostInitialise() {}
+ public void PostInitialise()
+ {
+ }
public void Close() {}
@@ -226,5 +234,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
+
+ private void CapabilitiesCommand(string module, string[] cmdparams)
+ {
+ System.Text.StringBuilder caps = new System.Text.StringBuilder();
+ caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
+
+ foreach (KeyValuePair kvp in m_capsHandlers)
+ {
+ caps.AppendFormat("** User {0}:\n", kvp.Key);
+ for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); )
+ {
+ Uri uri = new Uri(kvp2.Value.ToString());
+ caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery);
+ }
+ }
+
+ MainConsole.Instance.Output(caps.ToString());
+ }
}
}
--
cgit v1.1
From cc81d924cab97889538c20e9bfa45008ecfead3e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:34:02 -0800
Subject: Fixed Caps handlers leak
---
OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index 75df6cc..1d8e70e 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -66,7 +66,6 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
"show capabilities",
"Shows all registered capabilities", CapabilitiesCommand);
- m_log.Error("\n\n**************************************************************\n\n");
}
public void RegionLoaded(Scene scene)
--
cgit v1.1
From 3411d4867d01d4cf87f09300f69d149c5269c611 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:40:55 -0800
Subject: Honor check of m_Enabled in WorldViewModule.
---
OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
index d4b7020..cee8851 100644
--- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
+++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
@@ -71,6 +71,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
public void RegionLoaded(Scene scene)
{
+ if (!m_Enabled)
+ return;
+
m_Generator = scene.RequestModuleInterface();
if (m_Generator == null)
{
--
cgit v1.1
From 2c7e87c45bb0d543ba0ab9342a1bc29f92fb4fd3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Feb 2011 07:51:20 -0800
Subject: Better output for show neighbours
---
.../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 023a44c..3c36799 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -247,13 +247,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
public void NeighboursCommand(string module, string[] cmdparams)
{
+ System.Text.StringBuilder caps = new System.Text.StringBuilder();
+
foreach (KeyValuePair kvp in m_LocalCache)
{
- m_log.InfoFormat("*** Neighbours of {0} {1} ***", kvp.Key, kvp.Value.RegionName);
+ caps.AppendFormat("*** Neighbours of {0} ({1}) ***\n", kvp.Value.RegionName, kvp.Key);
List regions = kvp.Value.GetNeighbours();
foreach (GridRegion r in regions)
- m_log.InfoFormat(" {0} @ {1}={2}", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
+ caps.AppendFormat(" {0} @ {1}-{2}\n", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
}
+
+ MainConsole.Instance.Output(caps.ToString());
}
}
--
cgit v1.1
From 98ea78fc77b3dd6da185d71dfab402a0ef8780d6 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Feb 2011 19:39:29 -0800
Subject: New command: show pending-objects
---
OpenSim/Region/Application/OpenSim.cs | 22 ++++++++++++++++++++++
.../Region/Framework/Interfaces/ISceneViewer.cs | 1 +
OpenSim/Region/Framework/Scenes/SceneViewer.cs | 8 ++++++++
3 files changed, 31 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index bbcc588..bd1aa46 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -302,6 +302,10 @@ namespace OpenSim
"show http-handlers",
"Show all registered http handlers", HandleShow);
+ m_console.Commands.AddCommand("region", false, "show pending-objects",
+ "show pending-objects",
+ "Show # of objects on the pending queues of all scene viewers", HandleShow);
+
m_console.Commands.AddCommand("region", false, "show modules",
"show modules",
"Show module data", HandleShow);
@@ -993,6 +997,24 @@ namespace OpenSim
MainConsole.Instance.Output(handlers.ToString());
break;
+ case "pending-objects":
+ System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n");
+ m_sceneManager.ForEachScene(
+ delegate(Scene scene)
+ {
+ scene.ForEachScenePresence(
+ delegate(ScenePresence sp)
+ {
+ pending.AppendFormat("{0}: {1} {2} pending\n",
+ scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount());
+ }
+ );
+ }
+ );
+
+ MainConsole.Instance.Output(pending.ToString());
+ break;
+
case "modules":
MainConsole.Instance.Output("The currently loaded shared modules are:");
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
index 7251d57..2397f22 100644
--- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
@@ -36,5 +36,6 @@ namespace OpenSim.Region.Framework.Interfaces
void Close();
void QueuePartForUpdate(SceneObjectPart part);
void SendPrimUpdates();
+ int GetPendingObjectsCount();
}
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b44a010..7c067ca 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes
Reset();
}
+ public int GetPendingObjectsCount()
+ {
+ if (m_pendingObjects != null)
+ return m_pendingObjects.Count;
+
+ return 0;
+ }
+
public class ScenePartUpdate
{
public UUID FullID;
--
cgit v1.1
From ebeef02fef1a04b5b4cfe13dad588bcce7f9ba21 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 7 Feb 2011 07:45:03 -0800
Subject: Hunting down mantis #5365 Revert "refactor: remove redundant null
checks"
This reverts commit 6e58996b4d9db202cd7795a37bd687362effef48.
---
.../LindenUDP/UnackedPacketCollection.cs | 45 ++++++++++++++--------
1 file changed, 30 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index 9d40688..d762bef 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -141,31 +141,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues()
{
// Process all the pending adds
+
OutgoingPacket pendingAdd;
- while (m_pendingAdds.TryDequeue(out pendingAdd))
- m_packets[pendingAdd.SequenceNumber] = pendingAdd;
+ if (m_pendingAdds != null)
+ {
+ while (m_pendingAdds.TryDequeue(out pendingAdd))
+ {
+ if (pendingAdd != null && m_packets != null)
+ {
+ m_packets[pendingAdd.SequenceNumber] = pendingAdd;
+ }
+ }
+ }
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
OutgoingPacket ackedPacket;
- while (m_pendingRemoves.TryDequeue(out pendingRemove))
+ if (m_pendingRemoves != null)
{
- if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
+ while (m_pendingRemoves.TryDequeue(out pendingRemove))
{
- m_packets.Remove(pendingRemove.SequenceNumber);
-
- // Update stats
- Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
-
- if (!pendingRemove.FromResend)
+ if (m_pendingRemoves != null && m_packets != null)
{
- // Calculate the round-trip time for this packet and its ACK
- int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
- if (rtt > 0)
- ackedPacket.Client.UpdateRoundTrip(rtt);
+ if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
+ {
+ m_packets.Remove(pendingRemove.SequenceNumber);
+
+ // Update stats
+ Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
+
+ if (!pendingRemove.FromResend)
+ {
+ // Calculate the round-trip time for this packet and its ACK
+ int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
+ if (rtt > 0)
+ ackedPacket.Client.UpdateRoundTrip(rtt);
+ }
+ }
}
}
}
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From e8ba3d3a101a8b797021a9915b02c1bbfdf33448 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 7 Feb 2011 22:25:43 +0100
Subject: Prevent a nonexistent inventory item from throwing an exception
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 59e905e..cdaaab3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4195,7 +4195,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (!found)
{
llSay(0, String.Format("Could not find object '{0}'", inventory));
- throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory));
+ return;
+// throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory));
}
// check if destination is an object
--
cgit v1.1
From 6becaf65e15e3fde2d910925b4f7ff09971121f3 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 7 Feb 2011 22:28:59 +0000
Subject: Fix merge issues
---
.../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 6 ------
.../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 -----------
2 files changed, 17 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 68538c9..a71def7 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -128,11 +128,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ " is the user's last name." + Environment.NewLine
+ " is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile= adds the url of the profile service to the saved user information." + Environment.NewLine
-<<<<<<< HEAD:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
-=======
+ "-c|--creators preserves information about foreign creators." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
->>>>>>> master:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+ " is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleSaveInvConsoleCommand);
@@ -399,11 +396,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
-<<<<<<< HEAD:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
-=======
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
->>>>>>> master:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
List mainParams = ops.Parse(cmdparams);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e6ebc6e..673ea46 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1917,14 +1917,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
protected void SetTexture(SceneObjectPart part, string texture, int face)
{
-<<<<<<< HEAD:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return;
- UUID textureID=new UUID();
-=======
UUID textureID = new UUID();
->>>>>>> master:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
textureID = InventoryKey(texture, (int)AssetType.Texture);
if (textureID == UUID.Zero)
@@ -3346,15 +3342,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
msg.dialog = (byte)19; // MessageFromObject
msg.fromGroup = false;// fromGroup;
msg.offline = (byte)0; //offline;
-<<<<<<< HEAD:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
msg.ParentEstateID = World.RegionInfo.EstateSettings.EstateID;
msg.Position = new Vector3(m_host.AbsolutePosition);
msg.RegionID = World.RegionInfo.RegionID.Guid;
- msg.binaryBucket = Util.StringToBytes256(m_host.OwnerID.ToString());
-=======
- msg.ParentEstateID = 0; //ParentEstateID;
- msg.Position = new Vector3(m_host.AbsolutePosition);
- msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
msg.binaryBucket
= Util.StringToBytes256(
"{0}/{1}/{2}/{3}",
@@ -3362,7 +3352,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
(int)Math.Floor(m_host.AbsolutePosition.X),
(int)Math.Floor(m_host.AbsolutePosition.Y),
(int)Math.Floor(m_host.AbsolutePosition.Z));
->>>>>>> master:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
if (m_TransferModule != null)
{
--
cgit v1.1
From d934add0213400f03bc4dc2d24e1b0ccee965101 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 7 Feb 2011 14:49:18 -0800
Subject: Thanks Tokeiito for noticing this bug. mantis #5366
---
.../Authorization/RemoteAuthorizationServiceConnector.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index 01a2615..66994fa 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
if (scene != null)
{
- UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, userID);
+ UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
isAuthorized = IsAuthorizedForRegion(userID, account.FirstName, account.LastName,
account.Email, scene.RegionInfo.RegionName, regionID, out message);
}
--
cgit v1.1
From d627122cdcbff1888b7334a524ed652731ba3766 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 7 Feb 2011 19:44:55 -0800
Subject: Mantis #5368 -- exception on WorldMap
---
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index e0f36a2..1094970 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -764,10 +764,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
if (!responseMap.ContainsKey(itemtype.ToString())) // remote sim doesnt have the stated region handle
{
- if (!m_blacklistedregions.ContainsKey(regionhandle))
+ m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting.");
+ lock (m_blacklistedregions)
{
- m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting.");
- m_blacklistedregions.Add(regionhandle, Environment.TickCount);
+ if (!m_blacklistedregions.ContainsKey(regionhandle))
+ m_blacklistedregions.Add(regionhandle, Environment.TickCount);
}
}
--
cgit v1.1
From ac7bc78555c1dd51724790032f0711b24bc8c67d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 12:06:14 -0800
Subject: Added emergency monitoring of UDP Outgoing packets thread. Just type
"emergency-monitoring on/off"
---
.../Region/ClientStack/LindenUDP/LLUDPServer.cs | 100 +++++++++++++++++++++
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +
.../Agent/UDP/Linden/LindenUDPInfoModule.cs | 30 ++++++-
3 files changed, 130 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 5ff9aee..72257d2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -27,6 +27,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Sockets;
@@ -1053,6 +1054,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Update Timers
+ if (m_scene.EmergencyMonitoring)
+ clientPacketHandler = MonitoredClientOutgoingPacketHandler;
+
// Handle outgoing packets, resends, acknowledgements, and pings for each
// client. m_packetSent will be set to true if a packet is sent
m_scene.ForEachClient(clientPacketHandler);
@@ -1068,6 +1072,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex);
}
+
}
Watchdog.RemoveThread();
@@ -1105,6 +1110,101 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
+ #region Emergency Monitoring
+ private Stopwatch watch1 = new Stopwatch();
+ private Stopwatch watch2 = new Stopwatch();
+
+ private float avgProcessingTicks = 0;
+ private float avgResendUnackedTicks = 0;
+ private float avgSendAcksTicks = 0;
+ private float avgSendPingTicks = 0;
+ private float avgDequeueTicks = 0;
+ private long nticks = 0;
+ private long nticksUnack = 0;
+ private long nticksAck = 0;
+ private long nticksPing = 0;
+
+ private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
+ {
+ nticks++;
+ watch1.Start();
+ try
+ {
+ if (client is LLClientView)
+ {
+ LLUDPClient udpClient = ((LLClientView)client).UDPClient;
+
+ if (udpClient.IsConnected)
+ {
+ if (m_resendUnacked)
+ {
+ nticksUnack++;
+ watch2.Start();
+
+ ResendUnacked(udpClient);
+
+ watch2.Stop();
+ avgResendUnackedTicks = (nticksUnack - 1)/(float)nticksUnack * avgResendUnackedTicks + (watch2.ElapsedTicks / (float)nticksUnack);
+ watch2.Reset();
+ }
+
+ if (m_sendAcks)
+ {
+ nticksAck++;
+ watch2.Start();
+
+ SendAcks(udpClient);
+
+ watch2.Stop();
+ avgSendAcksTicks = (nticksAck - 1) / (float)nticksAck * avgSendAcksTicks + (watch2.ElapsedTicks / (float)nticksAck);
+ watch2.Reset();
+ }
+
+ if (m_sendPing)
+ {
+ nticksPing++;
+ watch2.Start();
+
+ SendPing(udpClient);
+
+ watch2.Stop();
+ avgSendPingTicks = (nticksPing - 1) / (float)nticksPing * avgSendPingTicks + (watch2.ElapsedTicks / (float)nticksPing);
+ watch2.Reset();
+ }
+
+ watch2.Start();
+ // Dequeue any outgoing packets that are within the throttle limits
+ if (udpClient.DequeueOutgoing())
+ m_packetSent = true;
+ watch2.Stop();
+ avgDequeueTicks = (nticks - 1) / (float)nticks * avgDequeueTicks + (watch2.ElapsedTicks / (float)nticks);
+ watch2.Reset();
+
+ }
+ else
+ m_log.WarnFormat("[LLUDPSERVER]: Client is not connected");
+ }
+ }
+ catch (Exception ex)
+ {
+ m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler iteration for " + client.Name +
+ " threw an exception: " + ex.Message, ex);
+ }
+ watch1.Stop();
+ avgProcessingTicks = (nticks - 1) / (float)nticks * avgProcessingTicks + (watch1.ElapsedTicks / (float)nticks);
+ watch1.Reset();
+
+ // reuse this -- it's every 100ms
+ if (m_scene.EmergencyMonitoring && nticks % 100 == 0)
+ {
+ m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (pack sent? {5})",
+ avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, m_packetSent);
+ }
+
+ }
+
+ #endregion
+
private void ProcessInPacket(object state)
{
IncomingPacket incomingPacket = (IncomingPacket)state;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4fca261..355671c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
+ public bool EmergencyMonitoring = false;
+
public SynchronizeSceneHandler SynchronizeScene;
public SimStatsReporter StatsReporter;
public List NorthBorders = new List();
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 6630edb..53cebb2 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -95,7 +95,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
"Show throttle settings for each client and for the server overall",
"Without the 'full' option, only root agents are shown."
+ " With the 'full' option child agents are also shown.",
- ShowThrottlesReport);
+ ShowThrottlesReport);
+
+ scene.AddCommand(
+ this, "emergency-monitoring",
+ "Go on/off emergency monitoring mode",
+ "Go on/off emergency monitoring mode",
+ "Go on/off emergency monitoring mode",
+ EmergencyMonitoring);
+
}
public void RemoveRegion(Scene scene)
@@ -120,7 +128,25 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
{
MainConsole.Instance.Output(GetThrottlesReport(cmd));
}
-
+
+ protected void EmergencyMonitoring(string module, string[] cmd)
+ {
+ bool mode = true;
+ if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on"))
+ {
+ mode = true;
+ MainConsole.Instance.Output("Emergency Monitoring ON");
+ }
+ else
+ {
+ mode = false;
+ MainConsole.Instance.Output("Emergency Monitoring OFF");
+ }
+
+ foreach (Scene s in m_scenes.Values)
+ s.EmergencyMonitoring = mode;
+ }
+
protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
{
return string.Format(
--
cgit v1.1
From f62cb1fcbe9cc90375bb270e71cbbd22ba6eb933 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 8 Feb 2011 21:13:31 +0100
Subject: Temp fix (or is it a fox?) for map weirdness
---
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index e0f36a2..c3efbda 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
}
else
{
- OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount());
+ OSDArray responsearr = new OSDArray(); // Don't preallocate. MT (m_scene.GetRootAgentCount());
m_scene.ForEachScenePresence(delegate(ScenePresence sp)
{
OSDMap responsemapdata = new OSDMap();
--
cgit v1.1
From 82846afe4b2a141421bff136dec9eef553522aa7 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 12:37:37 -0800
Subject: Minor improvement to previous commit.
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 72257d2..703ef6a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1056,6 +1056,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_scene.EmergencyMonitoring)
clientPacketHandler = MonitoredClientOutgoingPacketHandler;
+ else
+ clientPacketHandler = ClientOutgoingPacketHandler;
// Handle outgoing packets, resends, acknowledgements, and pings for each
// client. m_packetSent will be set to true if a packet is sent
@@ -1197,8 +1199,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// reuse this -- it's every 100ms
if (m_scene.EmergencyMonitoring && nticks % 100 == 0)
{
- m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (pack sent? {5})",
- avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, m_packetSent);
+ m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (TickCountRes: {5})",
+ avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, TickCountResolution);
}
}
--
cgit v1.1
From f431bd20ec18222a69fe1371b6145cf7415fdf9f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 14:49:50 -0800
Subject: Minor addition to the previous commit
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 703ef6a..bfbe959 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1125,6 +1125,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private long nticksUnack = 0;
private long nticksAck = 0;
private long nticksPing = 0;
+ private int npacksSent = 0;
+ private int npackNotSent = 0;
private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
{
@@ -1177,7 +1179,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
watch2.Start();
// Dequeue any outgoing packets that are within the throttle limits
if (udpClient.DequeueOutgoing())
+ {
m_packetSent = true;
+ npacksSent++;
+ }
+ else
+ npackNotSent++;
+
watch2.Stop();
avgDequeueTicks = (nticks - 1) / (float)nticks * avgDequeueTicks + (watch2.ElapsedTicks / (float)nticks);
watch2.Reset();
@@ -1196,11 +1204,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
avgProcessingTicks = (nticks - 1) / (float)nticks * avgProcessingTicks + (watch1.ElapsedTicks / (float)nticks);
watch1.Reset();
- // reuse this -- it's every 100ms
+ // reuse this -- it's every ~100ms
if (m_scene.EmergencyMonitoring && nticks % 100 == 0)
{
- m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (TickCountRes: {5})",
- avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, TickCountResolution);
+ m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (TickCountRes: {5} sent: {6} notsent: {7})",
+ avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, TickCountResolution, npacksSent, npackNotSent);
+ npackNotSent = npacksSent = 0;
}
}
--
cgit v1.1
From 117462cba18fd0f9610d854760b92362b3beea7c Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 17:53:01 -0800
Subject: Avoid potential race conditions on UseCircuitCode. I artificially
made the race condition happen, and got very similar results to those
described in mantis #5365 -- no prims/avie sent back.
---
.../Region/ClientStack/LindenUDP/LLUDPServer.cs | 51 ++++++++++++----------
1 file changed, 28 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index bfbe959..04fec95 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -640,10 +640,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
object[] array = new object[] { buffer, packet };
- if (m_asyncPacketHandling)
- Util.FireAndForget(HandleUseCircuitCode, array);
- else
- HandleUseCircuitCode(array);
+ Util.FireAndForget(HandleUseCircuitCode, array);
return;
}
@@ -857,11 +854,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
+ // Acknowledge the UseCircuitCode packet immediately, even before processing further
+ // This is so that the client doesn't send another one
+ SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
+
// Begin the process of adding the client to the simulator
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
-
- // Acknowledge the UseCircuitCode packet
- SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
// m_log.DebugFormat(
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
@@ -927,25 +925,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
{
- // Create the LLUDPClient
- LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
- IClientAPI existingClient;
-
- if (!m_scene.TryGetClient(agentID, out existingClient))
+ // In priciple there shouldn't be more than one thread here, ever.
+ // But in case that happens, we need to synchronize this piece of code
+ // because it's too important
+ lock (this)
{
- // Create the LLClientView
- LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
- client.OnLogout += LogoutHandler;
+ IClientAPI existingClient;
- client.DisableFacelights = m_disableFacelights;
+ if (!m_scene.TryGetClient(agentID, out existingClient))
+ {
+ // Create the LLUDPClient
+ LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
+ // Create the LLClientView
+ LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
+ client.OnLogout += LogoutHandler;
- // Start the IClientAPI
- client.Start();
- }
- else
- {
- m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
- udpClient.AgentID, remoteEndPoint, circuitCode);
+ client.DisableFacelights = m_disableFacelights;
+
+ // Start the IClientAPI
+ client.Start();
+
+ }
+ else
+ {
+ m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
+ existingClient.AgentId, remoteEndPoint, circuitCode);
+ }
}
}
--
cgit v1.1
From 585473aade100c3ffeef27e0c8e6b6c8c09d0109 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 20:12:33 -0800
Subject: Brute-force debug -- mantis #5365
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 18 +++++++++++++++---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 5 +++++
2 files changed, 20 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 65a8fe3..2d58b94 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -463,12 +463,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bool packetSent = false;
ThrottleOutPacketTypeFlags emptyCategories = 0;
- //string queueDebugOutput = String.Empty; // Serious debug business
+ string queueDebugOutput = String.Empty; // Serious debug business
for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
{
bucket = m_throttleCategories[i];
- //queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
+ if (i == 4)
+ queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
if (m_nextPackets[i] != null)
{
@@ -476,13 +477,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// leaving a dequeued packet still waiting to be sent out. Try to
// send it again
OutgoingPacket nextPacket = m_nextPackets[i];
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
if (bucket.RemoveTokens(nextPacket.Buffer.DataLength))
{
+ if (i == 4) queueDebugOutput += " removed tokens ";
// Send the packet
m_udpServer.SendPacketFinal(nextPacket);
m_nextPackets[i] = null;
packetSent = true;
}
+ else
+ if (i == 4) queueDebugOutput += " did not remove tokens ";
}
else
{
@@ -491,6 +496,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
queue = m_packetOutboxes[i];
if (queue.Dequeue(out packet))
{
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
// A packet was pulled off the queue. See if we have
// enough tokens in the bucket to send it out
if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -498,11 +504,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Send the packet
m_udpServer.SendPacketFinal(packet);
packetSent = true;
+ if (i == 4) queueDebugOutput += " removed tokens ";
}
else
{
// Save the dequeued packet for the next iteration
m_nextPackets[i] = packet;
+ if (i == 4) queueDebugOutput += " did not remove tokens ";
}
// If the queue is empty after this dequeue, fire the queue
@@ -513,17 +521,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
// No packets in this queue. Fire the queue empty callback
// if it has not been called recently
emptyCategories |= CategoryToFlag(i);
}
}
+
}
if (emptyCategories != 0)
BeginFireQueueEmpty(emptyCategories);
- //m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
+ if (m_udpServer.EmergencyMonitoring)
+ m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
+
return packetSent;
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 04fec95..922e2bc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1133,6 +1133,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int npacksSent = 0;
private int npackNotSent = 0;
+ public bool EmergencyMonitoring
+ {
+ get { return m_scene.EmergencyMonitoring; }
+ }
+
private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
{
nticks++;
--
cgit v1.1
From ba202ea9b08b1205de343c65fd209b6cca4cb6bc Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 21:09:10 -0800
Subject: Don't build strings unless we're in emergency debugging.
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 2d58b94..20f0410 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -468,7 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
{
bucket = m_throttleCategories[i];
- if (i == 4)
+ if (m_udpServer.EmergencyMonitoring && i == 4)
queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
if (m_nextPackets[i] != null)
@@ -477,17 +477,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// leaving a dequeued packet still waiting to be sent out. Try to
// send it again
OutgoingPacket nextPacket = m_nextPackets[i];
- if (i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
if (bucket.RemoveTokens(nextPacket.Buffer.DataLength))
{
- if (i == 4) queueDebugOutput += " removed tokens ";
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " removed tokens ";
// Send the packet
m_udpServer.SendPacketFinal(nextPacket);
m_nextPackets[i] = null;
packetSent = true;
}
else
- if (i == 4) queueDebugOutput += " did not remove tokens ";
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " did not remove tokens ";
}
else
{
@@ -496,7 +496,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
queue = m_packetOutboxes[i];
if (queue.Dequeue(out packet))
{
- if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
// A packet was pulled off the queue. See if we have
// enough tokens in the bucket to send it out
if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -504,13 +504,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Send the packet
m_udpServer.SendPacketFinal(packet);
packetSent = true;
- if (i == 4) queueDebugOutput += " removed tokens ";
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " removed tokens ";
}
else
{
// Save the dequeued packet for the next iteration
m_nextPackets[i] = packet;
- if (i == 4) queueDebugOutput += " did not remove tokens ";
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " did not remove tokens ";
}
// If the queue is empty after this dequeue, fire the queue
@@ -521,7 +521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
- if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
+ if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
// No packets in this queue. Fire the queue empty callback
// if it has not been called recently
emptyCategories |= CategoryToFlag(i);
--
cgit v1.1
From 473fac4dc71858139bd44c1e9ce4fd03d9d1bd91 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 08:06:20 -0800
Subject: Detect negative dripAmounts in TokenBuckets. These negatives result
from overflown integer operations. Also added Total to the scene throttles
in show throttles.
---
OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 3 +++
OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
index bdbd284..dd52683 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
@@ -207,6 +207,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
int dripAmount = deltaMS * tokensPerMS;
+ if (dripAmount < 0)
+ Console.WriteLine("MAY DAY MAY DAY! Drip amount is " + dripAmount + ". This should not happen");
+
content = Math.Min(content + dripAmount, maxBurst);
lastDrip = now;
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 53cebb2..dfeecb1 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
ThrottleRates throttleRates = udpServer.ThrottleRates;
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
- "n/a",
+ (throttleRates.Total * 8) / 1000,
(throttleRates.ResendLimit * 8) / 1000,
(throttleRates.LandLimit * 8) / 1000,
(throttleRates.WindLimit * 8) / 1000,
--
cgit v1.1
From 477a869fb2cc615430d78cbad6a5a0eedf6b9bf8 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 08:08:57 -0800
Subject: More detection of negatives.
---
OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
index dd52683..de8b521 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
@@ -213,6 +213,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
content = Math.Min(content + dripAmount, maxBurst);
lastDrip = now;
+ if (content < 0)
+ Console.WriteLine("MAY DAY MAY DAY! Content is " + content + ". This should not happen");
+
return true;
}
}
--
cgit v1.1
From 1bba9c6300db10c78f606bf0c21be17004dde704 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 08:35:21 -0800
Subject: Revert "Don't build strings unless we're in emergency debugging."
This reverts commit ba202ea9b08b1205de343c65fd209b6cca4cb6bc.
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 20f0410..2d58b94 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -468,7 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
{
bucket = m_throttleCategories[i];
- if (m_udpServer.EmergencyMonitoring && i == 4)
+ if (i == 4)
queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
if (m_nextPackets[i] != null)
@@ -477,17 +477,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// leaving a dequeued packet still waiting to be sent out. Try to
// send it again
OutgoingPacket nextPacket = m_nextPackets[i];
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
if (bucket.RemoveTokens(nextPacket.Buffer.DataLength))
{
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " removed tokens ";
+ if (i == 4) queueDebugOutput += " removed tokens ";
// Send the packet
m_udpServer.SendPacketFinal(nextPacket);
m_nextPackets[i] = null;
packetSent = true;
}
else
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " did not remove tokens ";
+ if (i == 4) queueDebugOutput += " did not remove tokens ";
}
else
{
@@ -496,7 +496,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
queue = m_packetOutboxes[i];
if (queue.Dequeue(out packet))
{
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
// A packet was pulled off the queue. See if we have
// enough tokens in the bucket to send it out
if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -504,13 +504,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Send the packet
m_udpServer.SendPacketFinal(packet);
packetSent = true;
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " removed tokens ";
+ if (i == 4) queueDebugOutput += " removed tokens ";
}
else
{
// Save the dequeued packet for the next iteration
m_nextPackets[i] = packet;
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += " did not remove tokens ";
+ if (i == 4) queueDebugOutput += " did not remove tokens ";
}
// If the queue is empty after this dequeue, fire the queue
@@ -521,7 +521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
- if (m_udpServer.EmergencyMonitoring && i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
+ if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
// No packets in this queue. Fire the queue empty callback
// if it has not been called recently
emptyCategories |= CategoryToFlag(i);
--
cgit v1.1
From 830fee145d8e8fabc32365ee6f04732d4c85b1e3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 08:35:36 -0800
Subject: Revert "Brute-force debug -- mantis #5365"
This reverts commit 585473aade100c3ffeef27e0c8e6b6c8c09d0109.
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 18 +++---------------
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 5 -----
2 files changed, 3 insertions(+), 20 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 2d58b94..65a8fe3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -463,13 +463,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bool packetSent = false;
ThrottleOutPacketTypeFlags emptyCategories = 0;
- string queueDebugOutput = String.Empty; // Serious debug business
+ //string queueDebugOutput = String.Empty; // Serious debug business
for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
{
bucket = m_throttleCategories[i];
- if (i == 4)
- queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
+ //queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
if (m_nextPackets[i] != null)
{
@@ -477,17 +476,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// leaving a dequeued packet still waiting to be sent out. Try to
// send it again
OutgoingPacket nextPacket = m_nextPackets[i];
- if (i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
if (bucket.RemoveTokens(nextPacket.Buffer.DataLength))
{
- if (i == 4) queueDebugOutput += " removed tokens ";
// Send the packet
m_udpServer.SendPacketFinal(nextPacket);
m_nextPackets[i] = null;
packetSent = true;
}
- else
- if (i == 4) queueDebugOutput += " did not remove tokens ";
}
else
{
@@ -496,7 +491,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
queue = m_packetOutboxes[i];
if (queue.Dequeue(out packet))
{
- if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
// A packet was pulled off the queue. See if we have
// enough tokens in the bucket to send it out
if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -504,13 +498,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Send the packet
m_udpServer.SendPacketFinal(packet);
packetSent = true;
- if (i == 4) queueDebugOutput += " removed tokens ";
}
else
{
// Save the dequeued packet for the next iteration
m_nextPackets[i] = packet;
- if (i == 4) queueDebugOutput += " did not remove tokens ";
}
// If the queue is empty after this dequeue, fire the queue
@@ -521,21 +513,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
- if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
// No packets in this queue. Fire the queue empty callback
// if it has not been called recently
emptyCategories |= CategoryToFlag(i);
}
}
-
}
if (emptyCategories != 0)
BeginFireQueueEmpty(emptyCategories);
- if (m_udpServer.EmergencyMonitoring)
- m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
-
+ //m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
return packetSent;
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 922e2bc..04fec95 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1133,11 +1133,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int npacksSent = 0;
private int npackNotSent = 0;
- public bool EmergencyMonitoring
- {
- get { return m_scene.EmergencyMonitoring; }
- }
-
private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
{
nticks++;
--
cgit v1.1
From 1cd951e5aedad4be809fc2674e57e34d0972b67c Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 09:39:53 -0800
Subject: Fix the negative number problem in TokenBucket. mantis #5365
---
OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
index de8b521..0a8331f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
@@ -207,14 +207,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
int dripAmount = deltaMS * tokensPerMS;
- if (dripAmount < 0)
- Console.WriteLine("MAY DAY MAY DAY! Drip amount is " + dripAmount + ". This should not happen");
-
content = Math.Min(content + dripAmount, maxBurst);
lastDrip = now;
- if (content < 0)
- Console.WriteLine("MAY DAY MAY DAY! Content is " + content + ". This should not happen");
+ if (dripAmount < 0 || content < 0)
+ // sim has been idle for too long, integer has overflown
+ // previous calculation is meaningless, let's put it at correct max
+ content = maxBurst;
return true;
}
--
cgit v1.1
From f33e51e2ffd475ccdbc69429b4b4d707e88cc050 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 09:50:26 -0800
Subject: Comment instrumentation out. Not needed anymore. Left in comments, in
case it is needed again. Mantis #5365
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 04fec95..207d213 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1059,10 +1059,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Update Timers
- if (m_scene.EmergencyMonitoring)
- clientPacketHandler = MonitoredClientOutgoingPacketHandler;
- else
- clientPacketHandler = ClientOutgoingPacketHandler;
+ // Use this for emergency monitoring -- bug hunting
+ //if (m_scene.EmergencyMonitoring)
+ // clientPacketHandler = MonitoredClientOutgoingPacketHandler;
+ //else
+ // clientPacketHandler = ClientOutgoingPacketHandler;
// Handle outgoing packets, resends, acknowledgements, and pings for each
// client. m_packetSent will be set to true if a packet is sent
@@ -1118,6 +1119,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
#region Emergency Monitoring
+ // Alternative packet handler fuull of instrumentation
+ // Handy for hunting bugs
private Stopwatch watch1 = new Stopwatch();
private Stopwatch watch2 = new Stopwatch();
--
cgit v1.1
From 21715396fa0d87bd4936bd37151487346794806d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 9 Feb 2011 17:45:19 -0800
Subject: Put the Ack of UseCircuitCode back to where it used to be. Some ppl
are reporting login issues.
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 207d213..584c577 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -854,14 +854,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
- // Acknowledge the UseCircuitCode packet immediately, even before processing further
- // This is so that the client doesn't send another one
- SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
-
// Begin the process of adding the client to the simulator
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
-
-// m_log.DebugFormat(
+
+ // Send ack
+ SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
+
+ // m_log.DebugFormat(
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
}
--
cgit v1.1
From 89bb5c0941625542ce3fe364cf91a2e2fa60cbcf Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 10 Feb 2011 06:09:04 -0800
Subject: Revert "Hunting down mantis #5365"
This reverts commit ebeef02fef1a04b5b4cfe13dad588bcce7f9ba21.
---
.../LindenUDP/UnackedPacketCollection.cs | 45 ++++++++--------------
1 file changed, 15 insertions(+), 30 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index d762bef..9d40688 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -141,46 +141,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues()
{
// Process all the pending adds
-
OutgoingPacket pendingAdd;
- if (m_pendingAdds != null)
- {
- while (m_pendingAdds.TryDequeue(out pendingAdd))
- {
- if (pendingAdd != null && m_packets != null)
- {
- m_packets[pendingAdd.SequenceNumber] = pendingAdd;
- }
- }
- }
+ while (m_pendingAdds.TryDequeue(out pendingAdd))
+ m_packets[pendingAdd.SequenceNumber] = pendingAdd;
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
OutgoingPacket ackedPacket;
- if (m_pendingRemoves != null)
+ while (m_pendingRemoves.TryDequeue(out pendingRemove))
{
- while (m_pendingRemoves.TryDequeue(out pendingRemove))
+ if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
{
- if (m_pendingRemoves != null && m_packets != null)
+ m_packets.Remove(pendingRemove.SequenceNumber);
+
+ // Update stats
+ Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
+
+ if (!pendingRemove.FromResend)
{
- if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
- {
- m_packets.Remove(pendingRemove.SequenceNumber);
-
- // Update stats
- Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
-
- if (!pendingRemove.FromResend)
- {
- // Calculate the round-trip time for this packet and its ACK
- int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
- if (rtt > 0)
- ackedPacket.Client.UpdateRoundTrip(rtt);
- }
- }
+ // Calculate the round-trip time for this packet and its ACK
+ int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
+ if (rtt > 0)
+ ackedPacket.Client.UpdateRoundTrip(rtt);
}
}
}
}
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 45382e6f828395cbbcc1324d366c4f3e0eff7ad7 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 10 Feb 2011 06:26:26 -0800
Subject: Reinstated a couple of null checks related to the previous revert.
---
.../LindenUDP/UnackedPacketCollection.cs | 26 +++++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index 9d40688..d195110 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -143,7 +143,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Process all the pending adds
OutgoingPacket pendingAdd;
while (m_pendingAdds.TryDequeue(out pendingAdd))
- m_packets[pendingAdd.SequenceNumber] = pendingAdd;
+ if (pendingAdd != null)
+ m_packets[pendingAdd.SequenceNumber] = pendingAdd;
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
@@ -152,17 +153,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
{
- m_packets.Remove(pendingRemove.SequenceNumber);
-
- // Update stats
- Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
-
- if (!pendingRemove.FromResend)
+ if (ackedPacket != null)
{
- // Calculate the round-trip time for this packet and its ACK
- int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
- if (rtt > 0)
- ackedPacket.Client.UpdateRoundTrip(rtt);
+ m_packets.Remove(pendingRemove.SequenceNumber);
+
+ // Update stats
+ Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
+
+ if (!pendingRemove.FromResend)
+ {
+ // Calculate the round-trip time for this packet and its ACK
+ int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
+ if (rtt > 0)
+ ackedPacket.Client.UpdateRoundTrip(rtt);
+ }
}
}
}
--
cgit v1.1
From 8fd58aa00c092da188a67573d4aa87c363f44eff Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 11 Feb 2011 22:09:46 +0000
Subject: add estate name to show regions console command
---
OpenSim/Region/Application/OpenSim.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index bd1aa46..4081888 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -1030,11 +1030,12 @@ namespace OpenSim
delegate(Scene scene)
{
MainConsole.Instance.Output(String.Format(
- "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
+ "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
scene.RegionInfo.RegionName,
scene.RegionInfo.RegionLocX,
scene.RegionInfo.RegionLocY,
- scene.RegionInfo.InternalEndPoint.Port));
+ scene.RegionInfo.InternalEndPoint.Port,
+ scene.RegionInfo.EstateSettings.EstateName));
});
break;
--
cgit v1.1
From 26727ee044f0be22abf070c7d320bce2da2c0d9a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 11 Feb 2011 23:32:38 +0000
Subject: refactor: split out estate management commands into separate class
---
.../World/Estate/EstateManagementCommands.cs | 156 ++++++
.../World/Estate/EstateManagementModule.cs | 584 +++++++++------------
2 files changed, 400 insertions(+), 340 deletions(-)
create mode 100644 OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
new file mode 100644
index 0000000..14f5b1e
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Security;
+using log4net;
+using Nini.Config;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+
+namespace OpenSim.Region.CoreModules.World.Estate
+{
+ public class EstateManagementCommands
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ protected EstateManagementModule m_module;
+
+ public EstateManagementCommands(EstateManagementModule module)
+ {
+ m_module = module;
+ }
+
+ public void Initialise()
+ {
+ m_module.Scene.AddCommand(this, "set terrain texture",
+ "set terrain texture [] []",
+ "Sets the terrain to , if or are specified, it will only " +
+ "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
+ " that coordinate.",
+ consoleSetTerrainTexture);
+
+ m_module.Scene.AddCommand(this, "set terrain heights",
+ "set terrain heights [] []",
+ "Sets the terrain texture heights on corner # to /, if or are specified, it will only " +
+ "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
+ " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
+ consoleSetTerrainHeights);
+ }
+
+ protected void consoleSetTerrainTexture(string module, string[] args)
+ {
+ string num = args[3];
+ string uuid = args[4];
+ int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
+ int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
+
+ if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
+ {
+ if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
+ {
+ int corner = int.Parse(num);
+ UUID texture = UUID.Parse(uuid);
+
+ m_log.Debug("[ESTATEMODULE]: Setting terrain textures for " + m_module.Scene.RegionInfo.RegionName +
+ string.Format(" (C#{0} = {1})", corner, texture));
+
+ switch (corner)
+ {
+ case 0:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
+ break;
+ case 1:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
+ break;
+ case 2:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
+ break;
+ case 3:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
+ break;
+ }
+
+ m_module.Scene.RegionInfo.RegionSettings.Save();
+ m_module.TriggerRegionInfoChange();
+ m_module.sendRegionInfoPacketToAll();
+ }
+ }
+ }
+
+ protected void consoleSetTerrainHeights(string module, string[] args)
+ {
+ string num = args[3];
+ string min = args[4];
+ string max = args[5];
+ int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
+ int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
+
+ if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
+ {
+ if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
+ {
+ int corner = int.Parse(num);
+ float lowValue = float.Parse(min, Culture.NumberFormatInfo);
+ float highValue = float.Parse(max, Culture.NumberFormatInfo);
+
+ m_log.Debug("[ESTATEMODULE]: Setting terrain heights " + m_module.Scene.RegionInfo.RegionName +
+ string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
+
+ switch (corner)
+ {
+ case 0:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
+ break;
+ case 1:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
+ break;
+ case 2:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
+ break;
+ case 3:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
+ break;
+ }
+
+ m_module.Scene.RegionInfo.RegionSettings.Save();
+ m_module.TriggerRegionInfoChange();
+ m_module.sendRegionHandshakeToAll();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 01f04d9..54d3c61 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -44,7 +45,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
private delegate void LookupUUIDS(List uuidLst);
- private Scene m_scene;
+ public Scene Scene { get; private set; }
+
+ protected EstateManagementCommands m_commands;
private EstateTerrainXferHandler TerrainUploader;
@@ -58,89 +61,89 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
uint sun = 0;
- if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
- sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800;
+ if (!Scene.RegionInfo.EstateSettings.UseGlobalTime)
+ sun = (uint)(Scene.RegionInfo.EstateSettings.SunPosition * 1024.0) + 0x1800;
UUID estateOwner;
- estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
+ estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
- if (m_scene.Permissions.IsGod(remote_client.AgentId))
+ if (Scene.Permissions.IsGod(remote_client.AgentId))
estateOwner = remote_client.AgentId;
remote_client.SendDetailedEstateData(invoice,
- m_scene.RegionInfo.EstateSettings.EstateName,
- m_scene.RegionInfo.EstateSettings.EstateID,
- m_scene.RegionInfo.EstateSettings.ParentEstateID,
+ Scene.RegionInfo.EstateSettings.EstateName,
+ Scene.RegionInfo.EstateSettings.EstateID,
+ Scene.RegionInfo.EstateSettings.ParentEstateID,
GetEstateFlags(),
sun,
- m_scene.RegionInfo.RegionSettings.Covenant,
- m_scene.RegionInfo.EstateSettings.AbuseEmail,
+ Scene.RegionInfo.RegionSettings.Covenant,
+ Scene.RegionInfo.EstateSettings.AbuseEmail,
estateOwner);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.EstateManagers,
- m_scene.RegionInfo.EstateSettings.EstateManagers,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateManagers,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.AccessOptions,
- m_scene.RegionInfo.EstateSettings.EstateAccess,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateAccess,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.AllowedGroups,
- m_scene.RegionInfo.EstateSettings.EstateGroups,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateGroups,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendBannedUserList(invoice,
- m_scene.RegionInfo.EstateSettings.EstateBans,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateBans,
+ Scene.RegionInfo.EstateSettings.EstateID);
}
private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
int matureLevel, bool restrictPushObject, bool allowParcelChanges)
{
if (blockTerraform)
- m_scene.RegionInfo.RegionSettings.BlockTerraform = true;
+ Scene.RegionInfo.RegionSettings.BlockTerraform = true;
else
- m_scene.RegionInfo.RegionSettings.BlockTerraform = false;
+ Scene.RegionInfo.RegionSettings.BlockTerraform = false;
if (noFly)
- m_scene.RegionInfo.RegionSettings.BlockFly = true;
+ Scene.RegionInfo.RegionSettings.BlockFly = true;
else
- m_scene.RegionInfo.RegionSettings.BlockFly = false;
+ Scene.RegionInfo.RegionSettings.BlockFly = false;
if (allowDamage)
- m_scene.RegionInfo.RegionSettings.AllowDamage = true;
+ Scene.RegionInfo.RegionSettings.AllowDamage = true;
else
- m_scene.RegionInfo.RegionSettings.AllowDamage = false;
+ Scene.RegionInfo.RegionSettings.AllowDamage = false;
if (blockLandResell)
- m_scene.RegionInfo.RegionSettings.AllowLandResell = false;
+ Scene.RegionInfo.RegionSettings.AllowLandResell = false;
else
- m_scene.RegionInfo.RegionSettings.AllowLandResell = true;
+ Scene.RegionInfo.RegionSettings.AllowLandResell = true;
- m_scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
+ Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
- m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
+ Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
if (matureLevel <= 13)
- m_scene.RegionInfo.RegionSettings.Maturity = 0;
+ Scene.RegionInfo.RegionSettings.Maturity = 0;
else if (matureLevel <= 21)
- m_scene.RegionInfo.RegionSettings.Maturity = 1;
+ Scene.RegionInfo.RegionSettings.Maturity = 1;
else
- m_scene.RegionInfo.RegionSettings.Maturity = 2;
+ Scene.RegionInfo.RegionSettings.Maturity = 2;
if (restrictPushObject)
- m_scene.RegionInfo.RegionSettings.RestrictPushing = true;
+ Scene.RegionInfo.RegionSettings.RestrictPushing = true;
else
- m_scene.RegionInfo.RegionSettings.RestrictPushing = false;
+ Scene.RegionInfo.RegionSettings.RestrictPushing = false;
if (allowParcelChanges)
- m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true;
+ Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true;
else
- m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false;
+ Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
@@ -154,19 +157,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
switch (corner)
{
case 0:
- m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
break;
case 1:
- m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
break;
case 2:
- m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
break;
case 3:
- m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
break;
}
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
}
@@ -176,23 +179,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
switch (corner)
{
case 0:
- m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
break;
case 1:
- m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
break;
case 2:
- m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
break;
case 3:
- m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
break;
}
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
}
@@ -208,30 +211,30 @@ namespace OpenSim.Region.CoreModules.World.Estate
bool UseGlobal, bool EstateFixedSun, float EstateSunHour)
{
// Water Height
- m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
+ Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
// Terraforming limits
- m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit;
- m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit;
+ Scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit;
+ Scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit;
// Time of day / fixed sun
- m_scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun;
- m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
- m_scene.RegionInfo.RegionSettings.SunPosition = SunHour;
+ Scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun;
+ Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
+ Scene.RegionInfo.RegionSettings.SunPosition = SunHour;
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
//m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
sendRegionInfoPacketToAll();
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
}
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
{
- IRestartModule restartModule = m_scene.RequestModuleInterface();
+ IRestartModule restartModule = Scene.RequestModuleInterface();
if (restartModule != null)
{
List times = new List();
@@ -252,8 +255,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
{
- m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
}
@@ -261,17 +264,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
// EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
- if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
+ if (user == Scene.RegionInfo.EstateSettings.EstateOwner)
return; // never process EO
if ((estateAccessType & 4) != 0) // User add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateUser(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateUser(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -281,13 +284,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 8) != 0) // User remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -296,12 +299,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 16) != 0) // Group add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateGroup(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateGroup(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -310,13 +313,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 32) != 0) // Group remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -325,9 +328,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 64) != 0) // Ban add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions())
{
- EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
+ EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans;
bool alreadyInList = false;
@@ -346,20 +349,20 @@ namespace OpenSim.Region.CoreModules.World.Estate
EstateBan item = new EstateBan();
item.BannedUserID = user;
- item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID;
+ item.EstateID = Scene.RegionInfo.EstateSettings.EstateID;
item.BannedHostAddress = "0.0.0.0";
item.BannedHostIPMask = "0.0.0.0";
- m_scene.RegionInfo.EstateSettings.AddBan(item);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddBan(item);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- ScenePresence s = m_scene.GetScenePresence(user);
+ ScenePresence s = Scene.GetScenePresence(user);
if (s != null)
{
if (!s.IsChildAgent)
{
- m_scene.TeleportClientHome(user, s.ControllingClient);
+ Scene.TeleportClientHome(user, s.ControllingClient);
}
}
@@ -369,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
remote_client.SendAlertMessage("User is already on the region ban list");
}
//m_scene.RegionInfo.regionBanlist.Add(Manager(user);
- remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -378,9 +381,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 128) != 0) // Ban remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions())
{
- EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
+ EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans;
bool alreadyInList = false;
EstateBan listitem = null;
@@ -393,20 +396,21 @@ namespace OpenSim.Region.CoreModules.World.Estate
listitem = banlistcheck[i];
break;
}
-
}
+
if (alreadyInList && listitem != null)
{
- m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
}
else
{
remote_client.SendAlertMessage("User is not on the region ban list");
}
+
//m_scene.RegionInfo.regionBanlist.Add(Manager(user);
- remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -415,12 +419,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 256) != 0) // Manager add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateManager(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -429,13 +433,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 512) != 0) // Manager remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -447,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void SendSimulatorBlueBoxMessage(
IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
{
- IDialogModule dm = m_scene.RequestModuleInterface();
+ IDialogModule dm = Scene.RequestModuleInterface();
if (dm != null)
dm.SendNotificationToUsersInRegion(senderID, senderName, message);
@@ -462,61 +466,62 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics)
{
if (physics)
- m_scene.RegionInfo.RegionSettings.DisablePhysics = true;
+ Scene.RegionInfo.RegionSettings.DisablePhysics = true;
else
- m_scene.RegionInfo.RegionSettings.DisablePhysics = false;
+ Scene.RegionInfo.RegionSettings.DisablePhysics = false;
if (scripted)
- m_scene.RegionInfo.RegionSettings.DisableScripts = true;
+ Scene.RegionInfo.RegionSettings.DisableScripts = true;
else
- m_scene.RegionInfo.RegionSettings.DisableScripts = false;
+ Scene.RegionInfo.RegionSettings.DisableScripts = false;
if (collisionEvents)
- m_scene.RegionInfo.RegionSettings.DisableCollisions = true;
+ Scene.RegionInfo.RegionSettings.DisableCollisions = true;
else
- m_scene.RegionInfo.RegionSettings.DisableCollisions = false;
+ Scene.RegionInfo.RegionSettings.DisableCollisions = false;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
- m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
+ Scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
}
private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
return;
if (prey != UUID.Zero)
{
- ScenePresence s = m_scene.GetScenePresence(prey);
+ ScenePresence s = Scene.GetScenePresence(prey);
if (s != null)
{
- m_scene.TeleportClientHome(prey, s.ControllingClient);
+ Scene.TeleportClientHome(prey, s.ControllingClient);
}
}
}
private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
return;
- m_scene.ForEachScenePresence(delegate(ScenePresence sp)
+ Scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if (sp.UUID != senderID)
{
- ScenePresence p = m_scene.GetScenePresence(sp.UUID);
+ ScenePresence p = Scene.GetScenePresence(sp.UUID);
// make sure they are still there, we could be working down a long list
// Also make sure they are actually in the region
if (p != null && !p.IsChildAgent)
{
- m_scene.TeleportClientHome(p.UUID, p.ControllingClient);
+ Scene.TeleportClientHome(p.UUID, p.ControllingClient);
}
}
});
}
+
private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID)
{
if (TerrainUploader != null)
@@ -547,11 +552,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
TerrainUploader = null;
}
remoteClient.SendAlertMessage("Terrain Upload Complete. Loading....");
- ITerrainModule terr = m_scene.RequestModuleInterface();
+ ITerrainModule terr = Scene.RequestModuleInterface();
if (terr != null)
{
- m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName);
+ m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
try
{
@@ -597,7 +602,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleUploadTerrain(IClientAPI remote_client, string clientFileName)
{
-
if (TerrainUploader == null)
{
@@ -615,16 +619,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!");
}
-
}
+
private void handleTerrainRequest(IClientAPI remote_client, string clientFileName)
{
// Save terrain here
- ITerrainModule terr = m_scene.RequestModuleInterface();
+ ITerrainModule terr = Scene.RequestModuleInterface();
if (terr != null)
{
- m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName);
+ m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
if (File.Exists(Util.dataDir() + "/terrain.raw"))
{
File.Delete(Util.dataDir() + "/terrain.raw");
@@ -635,7 +639,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
byte[] bdata = new byte[input.Length];
input.Read(bdata, 0, (int)input.Length);
remote_client.SendAlertMessage("Terrain file written, starting download...");
- m_scene.XferManager.AddNewFile("terrain.raw", bdata);
+ Scene.XferManager.AddNewFile("terrain.raw", bdata);
// Tell client about it
m_log.Warn("[CLIENT]: Sending Terrain to " + remote_client.Name);
remote_client.SendInitiateDownload("terrain.raw", clientFileName);
@@ -645,35 +649,35 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void HandleRegionInfoRequest(IClientAPI remote_client)
{
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
- args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor;
- args.estateID = m_scene.RegionInfo.EstateSettings.EstateID;
- args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit;
- args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus;
- args.parentEstateID = m_scene.RegionInfo.EstateSettings.ParentEstateID;
- args.pricePerMeter = m_scene.RegionInfo.EstateSettings.PricePerMeter;
- args.redirectGridX = m_scene.RegionInfo.EstateSettings.RedirectGridX;
- args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY;
+ args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
+ args.estateID = Scene.RegionInfo.EstateSettings.EstateID;
+ args.maxAgents = (byte)Scene.RegionInfo.RegionSettings.AgentLimit;
+ args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus;
+ args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID;
+ args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter;
+ args.redirectGridX = Scene.RegionInfo.EstateSettings.RedirectGridX;
+ args.redirectGridY = Scene.RegionInfo.EstateSettings.RedirectGridY;
args.regionFlags = GetRegionFlags();
- args.simAccess = m_scene.RegionInfo.AccessLevel;
- args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition;
- args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit;
- args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit;
- args.useEstateSun = m_scene.RegionInfo.RegionSettings.UseEstateSun;
- args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
- args.simName = m_scene.RegionInfo.RegionName;
- args.regionType = m_scene.RegionInfo.RegionType;
+ args.simAccess = Scene.RegionInfo.AccessLevel;
+ args.sunHour = (float)Scene.RegionInfo.RegionSettings.SunPosition;
+ args.terrainLowerLimit = (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit;
+ args.terrainRaiseLimit = (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit;
+ args.useEstateSun = Scene.RegionInfo.RegionSettings.UseEstateSun;
+ args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
+ args.simName = Scene.RegionInfo.RegionName;
+ args.regionType = Scene.RegionInfo.RegionType;
remote_client.SendRegionInfoToEstateMenu(args);
}
private void HandleEstateCovenantRequest(IClientAPI remote_client)
{
- remote_client.SendEstateCovenantInformation(m_scene.RegionInfo.RegionSettings.Covenant);
+ remote_client.SendEstateCovenantInformation(Scene.RegionInfo.RegionSettings.Covenant);
}
private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false))
return;
Dictionary SceneData = new Dictionary();
@@ -681,11 +685,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
if (reportType == 1)
{
- SceneData = m_scene.PhysicsScene.GetTopColliders();
+ SceneData = Scene.PhysicsScene.GetTopColliders();
}
else if (reportType == 0)
{
- SceneData = m_scene.SceneGraph.GetTopScripts();
+ SceneData = Scene.SceneGraph.GetTopScripts();
}
List SceneReport = new List();
@@ -693,7 +697,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
foreach (uint obj in SceneData.Keys)
{
- SceneObjectPart prt = m_scene.GetSceneObjectPart(obj);
+ SceneObjectPart prt = Scene.GetSceneObjectPart(obj);
if (prt != null)
{
if (prt.ParentGroup != null)
@@ -765,7 +769,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
// string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
- IUserManagement userManager = m_scene.RequestModuleInterface();
+ IUserManagement userManager = Scene.RequestModuleInterface();
if (userManager != null)
userManager.GetUserName(uuidarr[i]);
@@ -780,7 +784,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void sendRegionInfoPacketToAll()
{
- m_scene.ForEachScenePresence(delegate(ScenePresence sp)
+ Scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if (!sp.IsChildAgent)
HandleRegionInfoRequest(sp.ControllingClient);
@@ -791,99 +795,99 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
RegionHandshakeArgs args = new RegionHandshakeArgs();
- args.isEstateManager = m_scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId);
- if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && m_scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId)
+ args.isEstateManager = Scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId);
+ if (Scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && Scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId)
args.isEstateManager = true;
- args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor;
- args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW;
- args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW;
- args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW;
- args.terrainHeightRange1 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NW;
- args.terrainStartHeight2 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SE;
- args.terrainHeightRange2 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SE;
- args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE;
- args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE;
- args.simAccess = m_scene.RegionInfo.AccessLevel;
- args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
+ args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
+ args.terrainStartHeight0 = (float)Scene.RegionInfo.RegionSettings.Elevation1SW;
+ args.terrainHeightRange0 = (float)Scene.RegionInfo.RegionSettings.Elevation2SW;
+ args.terrainStartHeight1 = (float)Scene.RegionInfo.RegionSettings.Elevation1NW;
+ args.terrainHeightRange1 = (float)Scene.RegionInfo.RegionSettings.Elevation2NW;
+ args.terrainStartHeight2 = (float)Scene.RegionInfo.RegionSettings.Elevation1SE;
+ args.terrainHeightRange2 = (float)Scene.RegionInfo.RegionSettings.Elevation2SE;
+ args.terrainStartHeight3 = (float)Scene.RegionInfo.RegionSettings.Elevation1NE;
+ args.terrainHeightRange3 = (float)Scene.RegionInfo.RegionSettings.Elevation2NE;
+ args.simAccess = Scene.RegionInfo.AccessLevel;
+ args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
args.regionFlags = GetRegionFlags();
- args.regionName = m_scene.RegionInfo.RegionName;
- args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
+ args.regionName = Scene.RegionInfo.RegionName;
+ args.SimOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
args.terrainBase0 = UUID.Zero;
args.terrainBase1 = UUID.Zero;
args.terrainBase2 = UUID.Zero;
args.terrainBase3 = UUID.Zero;
- args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
- args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
- args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
- args.terrainDetail3 = m_scene.RegionInfo.RegionSettings.TerrainTexture4;
+ args.terrainDetail0 = Scene.RegionInfo.RegionSettings.TerrainTexture1;
+ args.terrainDetail1 = Scene.RegionInfo.RegionSettings.TerrainTexture2;
+ args.terrainDetail2 = Scene.RegionInfo.RegionSettings.TerrainTexture3;
+ args.terrainDetail3 = Scene.RegionInfo.RegionSettings.TerrainTexture4;
- remoteClient.SendRegionHandshake(m_scene.RegionInfo,args);
+ remoteClient.SendRegionHandshake(Scene.RegionInfo,args);
}
public void sendRegionHandshakeToAll()
{
- m_scene.ForEachClient(sendRegionHandshake);
+ Scene.ForEachClient(sendRegionHandshake);
}
public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
{
if (parms2 == 0)
{
- m_scene.RegionInfo.EstateSettings.UseGlobalTime = true;
- m_scene.RegionInfo.EstateSettings.SunPosition = 0.0;
+ Scene.RegionInfo.EstateSettings.UseGlobalTime = true;
+ Scene.RegionInfo.EstateSettings.SunPosition = 0.0;
}
else
{
- m_scene.RegionInfo.EstateSettings.UseGlobalTime = false;
- m_scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
+ Scene.RegionInfo.EstateSettings.UseGlobalTime = false;
+ Scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
}
if ((parms1 & 0x00000010) != 0)
- m_scene.RegionInfo.EstateSettings.FixedSun = true;
+ Scene.RegionInfo.EstateSettings.FixedSun = true;
else
- m_scene.RegionInfo.EstateSettings.FixedSun = false;
+ Scene.RegionInfo.EstateSettings.FixedSun = false;
if ((parms1 & 0x00008000) != 0)
- m_scene.RegionInfo.EstateSettings.PublicAccess = true;
+ Scene.RegionInfo.EstateSettings.PublicAccess = true;
else
- m_scene.RegionInfo.EstateSettings.PublicAccess = false;
+ Scene.RegionInfo.EstateSettings.PublicAccess = false;
if ((parms1 & 0x10000000) != 0)
- m_scene.RegionInfo.EstateSettings.AllowVoice = true;
+ Scene.RegionInfo.EstateSettings.AllowVoice = true;
else
- m_scene.RegionInfo.EstateSettings.AllowVoice = false;
+ Scene.RegionInfo.EstateSettings.AllowVoice = false;
if ((parms1 & 0x00100000) != 0)
- m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true;
+ Scene.RegionInfo.EstateSettings.AllowDirectTeleport = true;
else
- m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false;
+ Scene.RegionInfo.EstateSettings.AllowDirectTeleport = false;
if ((parms1 & 0x00800000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyAnonymous = true;
+ Scene.RegionInfo.EstateSettings.DenyAnonymous = true;
else
- m_scene.RegionInfo.EstateSettings.DenyAnonymous = false;
+ Scene.RegionInfo.EstateSettings.DenyAnonymous = false;
if ((parms1 & 0x01000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyIdentified = true;
+ Scene.RegionInfo.EstateSettings.DenyIdentified = true;
else
- m_scene.RegionInfo.EstateSettings.DenyIdentified = false;
+ Scene.RegionInfo.EstateSettings.DenyIdentified = false;
if ((parms1 & 0x02000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyTransacted = true;
+ Scene.RegionInfo.EstateSettings.DenyTransacted = true;
else
- m_scene.RegionInfo.EstateSettings.DenyTransacted = false;
+ Scene.RegionInfo.EstateSettings.DenyTransacted = false;
if ((parms1 & 0x40000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyMinors = true;
+ Scene.RegionInfo.EstateSettings.DenyMinors = true;
else
- m_scene.RegionInfo.EstateSettings.DenyMinors = false;
+ Scene.RegionInfo.EstateSettings.DenyMinors = false;
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
sendDetailedEstateData(remoteClient, invoice);
}
@@ -893,121 +897,21 @@ namespace OpenSim.Region.CoreModules.World.Estate
#region IRegionModule Members
public void Initialise(Scene scene, IConfigSource source)
- {
- m_scene = scene;
- m_scene.RegisterModuleInterface(this);
- m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
- m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
-
- m_scene.AddCommand(this, "set terrain texture",
- "set terrain texture [] []",
- "Sets the terrain to , if or are specified, it will only " +
- "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
- " that coordinate.",
- consoleSetTerrainTexture);
-
- m_scene.AddCommand(this, "set terrain heights",
- "set terrain heights [] []",
- "Sets the terrain texture heights on corner # to /, if or are specified, it will only " +
- "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
- " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
- consoleSetTerrainHeights);
- }
-
- #region Console Commands
-
- public void consoleSetTerrainTexture(string module, string[] args)
- {
- string num = args[3];
- string uuid = args[4];
- int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
- int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
-
- if (x == -1 || m_scene.RegionInfo.RegionLocX == x)
- {
- if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
- {
- int corner = int.Parse(num);
- UUID texture = UUID.Parse(uuid);
-
- m_log.Debug("[ESTATEMODULE] Setting terrain textures for " + m_scene.RegionInfo.RegionName +
- string.Format(" (C#{0} = {1})", corner, texture));
-
- switch (corner)
- {
- case 0:
- m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
- break;
- case 1:
- m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
- break;
- case 2:
- m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
- break;
- case 3:
- m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
- break;
- }
- m_scene.RegionInfo.RegionSettings.Save();
- TriggerRegionInfoChange();
- sendRegionInfoPacketToAll();
-
- }
- }
- }
-
- public void consoleSetTerrainHeights(string module, string[] args)
- {
- string num = args[3];
- string min = args[4];
- string max = args[5];
- int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
- int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
-
- if (x == -1 || m_scene.RegionInfo.RegionLocX == x)
- {
- if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
- {
- int corner = int.Parse(num);
- float lowValue = float.Parse(min, Culture.NumberFormatInfo);
- float highValue = float.Parse(max, Culture.NumberFormatInfo);
-
- m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName +
- string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
-
- switch (corner)
- {
- case 0:
- m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
- break;
- case 1:
- m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
- break;
- case 2:
- m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
- break;
- case 3:
- m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
- break;
- }
- m_scene.RegionInfo.RegionSettings.Save();
- TriggerRegionInfoChange();
- sendRegionHandshakeToAll();
- }
- }
+ {
+ Scene = scene;
+ Scene.RegisterModuleInterface(this);
+ Scene.EventManager.OnNewClient += EventManager_OnNewClient;
+ Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
+
+ m_commands = new EstateManagementCommands(this);
+ m_commands.Initialise();
}
- #endregion
-
public void PostInitialise()
{
// Sets up the sun module based no the saved Estate and Region Settings
// DO NOT REMOVE or the sun will stop working
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
}
public void Close()
@@ -1031,14 +935,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void changeWaterHeight(float height)
{
setRegionTerrainSettings(height,
- (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
- (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit,
- m_scene.RegionInfo.RegionSettings.UseEstateSun,
- m_scene.RegionInfo.RegionSettings.FixedSun,
- (float)m_scene.RegionInfo.RegionSettings.SunPosition,
- m_scene.RegionInfo.EstateSettings.UseGlobalTime,
- m_scene.RegionInfo.EstateSettings.FixedSun,
- (float)m_scene.RegionInfo.EstateSettings.SunPosition);
+ (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
+ (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit,
+ Scene.RegionInfo.RegionSettings.UseEstateSun,
+ Scene.RegionInfo.RegionSettings.FixedSun,
+ (float)Scene.RegionInfo.RegionSettings.SunPosition,
+ Scene.RegionInfo.EstateSettings.UseGlobalTime,
+ Scene.RegionInfo.EstateSettings.FixedSun,
+ (float)Scene.RegionInfo.EstateSettings.SunPosition);
sendRegionInfoPacketToAll();
}
@@ -1078,32 +982,32 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Fully implemented
//
- if (m_scene.RegionInfo.RegionSettings.AllowDamage)
+ if (Scene.RegionInfo.RegionSettings.AllowDamage)
flags |= RegionFlags.AllowDamage;
- if (m_scene.RegionInfo.RegionSettings.BlockTerraform)
+ if (Scene.RegionInfo.RegionSettings.BlockTerraform)
flags |= RegionFlags.BlockTerraform;
- if (!m_scene.RegionInfo.RegionSettings.AllowLandResell)
+ if (!Scene.RegionInfo.RegionSettings.AllowLandResell)
flags |= RegionFlags.BlockLandResell;
- if (m_scene.RegionInfo.RegionSettings.DisableCollisions)
+ if (Scene.RegionInfo.RegionSettings.DisableCollisions)
flags |= RegionFlags.SkipCollisions;
- if (m_scene.RegionInfo.RegionSettings.DisableScripts)
+ if (Scene.RegionInfo.RegionSettings.DisableScripts)
flags |= RegionFlags.SkipScripts;
- if (m_scene.RegionInfo.RegionSettings.DisablePhysics)
+ if (Scene.RegionInfo.RegionSettings.DisablePhysics)
flags |= RegionFlags.SkipPhysics;
- if (m_scene.RegionInfo.RegionSettings.BlockFly)
+ if (Scene.RegionInfo.RegionSettings.BlockFly)
flags |= RegionFlags.NoFly;
- if (m_scene.RegionInfo.RegionSettings.RestrictPushing)
+ if (Scene.RegionInfo.RegionSettings.RestrictPushing)
flags |= RegionFlags.RestrictPushObject;
- if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
+ if (Scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
flags |= RegionFlags.AllowParcelChanges;
- if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
+ if (Scene.RegionInfo.RegionSettings.BlockShowInSearch)
flags |= RegionFlags.BlockParcelSearch;
- if (m_scene.RegionInfo.RegionSettings.FixedSun)
+ if (Scene.RegionInfo.RegionSettings.FixedSun)
flags |= RegionFlags.SunFixed;
- if (m_scene.RegionInfo.RegionSettings.Sandbox)
+ if (Scene.RegionInfo.RegionSettings.Sandbox)
flags |= RegionFlags.Sandbox;
- if (m_scene.RegionInfo.EstateSettings.AllowVoice)
+ if (Scene.RegionInfo.EstateSettings.AllowVoice)
flags |= RegionFlags.AllowVoice;
// Fudge these to always on, so the menu options activate
@@ -1125,32 +1029,32 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
RegionFlags flags = RegionFlags.None;
- if (m_scene.RegionInfo.EstateSettings.FixedSun)
+ if (Scene.RegionInfo.EstateSettings.FixedSun)
flags |= RegionFlags.SunFixed;
- if (m_scene.RegionInfo.EstateSettings.PublicAccess)
+ if (Scene.RegionInfo.EstateSettings.PublicAccess)
flags |= (RegionFlags.PublicAllowed |
RegionFlags.ExternallyVisible);
- if (m_scene.RegionInfo.EstateSettings.AllowVoice)
+ if (Scene.RegionInfo.EstateSettings.AllowVoice)
flags |= RegionFlags.AllowVoice;
- if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
+ if (Scene.RegionInfo.EstateSettings.AllowDirectTeleport)
flags |= RegionFlags.AllowDirectTeleport;
- if (m_scene.RegionInfo.EstateSettings.DenyAnonymous)
+ if (Scene.RegionInfo.EstateSettings.DenyAnonymous)
flags |= RegionFlags.DenyAnonymous;
- if (m_scene.RegionInfo.EstateSettings.DenyIdentified)
+ if (Scene.RegionInfo.EstateSettings.DenyIdentified)
flags |= RegionFlags.DenyIdentified;
- if (m_scene.RegionInfo.EstateSettings.DenyTransacted)
+ if (Scene.RegionInfo.EstateSettings.DenyTransacted)
flags |= RegionFlags.DenyTransacted;
- if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
+ if (Scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
flags |= RegionFlags.AbuseEmailToEstateOwner;
- if (m_scene.RegionInfo.EstateSettings.BlockDwell)
+ if (Scene.RegionInfo.EstateSettings.BlockDwell)
flags |= RegionFlags.BlockDwell;
- if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts)
+ if (Scene.RegionInfo.EstateSettings.EstateSkipScripts)
flags |= RegionFlags.EstateSkipScripts;
- if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
+ if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
flags |= RegionFlags.ResetHomeOnTeleport;
- if (m_scene.RegionInfo.EstateSettings.TaxFree)
+ if (Scene.RegionInfo.EstateSettings.TaxFree)
flags |= RegionFlags.TaxFree;
- if (m_scene.RegionInfo.EstateSettings.DenyMinors)
+ if (Scene.RegionInfo.EstateSettings.DenyMinors)
flags |= (RegionFlags)(1 << 30);
return (uint)flags;
@@ -1158,38 +1062,38 @@ namespace OpenSim.Region.CoreModules.World.Estate
public bool IsManager(UUID avatarID)
{
- if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
+ if (avatarID == Scene.RegionInfo.EstateSettings.EstateOwner)
return true;
- List ems = new List(m_scene.RegionInfo.EstateSettings.EstateManagers);
+ List ems = new List(Scene.RegionInfo.EstateSettings.EstateManagers);
if (ems.Contains(avatarID))
return true;
return false;
}
- protected void TriggerRegionInfoChange()
+ public void TriggerRegionInfoChange()
{
ChangeDelegate change = OnRegionInfoChange;
if (change != null)
- change(m_scene.RegionInfo.RegionID);
+ change(Scene.RegionInfo.RegionID);
}
- protected void TriggerEstateInfoChange()
+ public void TriggerEstateInfoChange()
{
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
- change(m_scene.RegionInfo.RegionID);
+ change(Scene.RegionInfo.RegionID);
}
- protected void TriggerEstateMessage(UUID fromID, string fromName, string message)
+ public void TriggerEstateMessage(UUID fromID, string fromName, string message)
{
MessageDelegate onmessage = OnEstateMessage;
if (onmessage != null)
- onmessage(m_scene.RegionInfo.RegionID, fromID, fromName, message);
+ onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message);
}
}
}
--
cgit v1.1
From 7e21c1eadf28e86b29fdd24b33e29950e195c6db Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 12 Feb 2011 00:46:01 +0000
Subject: Hack in a crude temporary "estate show" command
This will show the estate for each region, along with that estate's id and the estate owner.
This is temporary because the command output might change.
This commit also converts the estate module from the old to the new region module format
---
.../World/Estate/EstateManagementCommands.cs | 74 +++++++++++++++++++++-
.../World/Estate/EstateManagementModule.cs | 40 ++++++------
.../Region/Framework/Interfaces/IEstateModule.cs | 2 +-
3 files changed, 94 insertions(+), 22 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 14f5b1e..f6d1a82 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -30,21 +30,29 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Security;
+using System.Text;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Framework.Console;
+using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Estate
{
+ ///
+ /// Estate management console commands.
+ ///
public class EstateManagementCommands
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected EstateManagementModule m_module;
+ protected Commander m_commander = new Commander("estate");
+
public EstateManagementCommands(EstateManagementModule module)
{
m_module = module;
@@ -52,20 +60,60 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void Initialise()
{
- m_module.Scene.AddCommand(this, "set terrain texture",
+ m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName);
+
+ m_module.Scene.AddCommand(m_module, "set terrain texture",
"set terrain texture [] []",
"Sets the terrain to , if or are specified, it will only " +
"set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
" that coordinate.",
consoleSetTerrainTexture);
- m_module.Scene.AddCommand(this, "set terrain heights",
+ m_module.Scene.AddCommand(m_module, "set terrain heights",
"set terrain heights [] []",
"Sets the terrain texture heights on corner # to /, if or are specified, it will only " +
"set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
" that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
consoleSetTerrainHeights);
- }
+
+ Command showCommand
+ = new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowEstatesCommand, "Shows all estates on the simulator.");
+
+ m_commander.RegisterCommand("show", showCommand);
+
+ m_module.Scene.RegisterModuleCommander(m_commander);
+
+ m_module.Scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
+ }
+
+ public void Close()
+ {
+ m_module.Scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole;
+ m_module.Scene.UnregisterModuleCommander(m_commander.Name);
+ }
+
+ ///
+ /// Processes commandline input. Do not call directly.
+ ///
+ /// Commandline arguments
+ protected void EventManagerOnPluginConsole(string[] args)
+ {
+ if (args[0] == "estate")
+ {
+ if (args.Length == 1)
+ {
+ m_commander.ProcessConsoleCommand("help", new string[0]);
+ return;
+ }
+
+ string[] tmpArgs = new string[args.Length - 2];
+ int i;
+ for (i = 2; i < args.Length; i++)
+ tmpArgs[i - 2] = args[i];
+
+ m_commander.ProcessConsoleCommand(args[1], tmpArgs);
+ }
+ }
protected void consoleSetTerrainTexture(string module, string[] args)
{
@@ -152,5 +200,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
}
+
+ protected void ShowEstatesCommand(Object[] args)
+ {
+ StringBuilder report = new StringBuilder();
+ RegionInfo ri = m_module.Scene.RegionInfo;
+ EstateSettings es = ri.EstateSettings;
+
+ report.AppendFormat("Estate information for region {0}\n", ri.RegionName);
+ report.AppendFormat(
+ "{0,-20} {1,-7} {2,-20}\n",
+ "Estate Name",
+ "ID",
+ "Owner");
+
+ report.AppendFormat(
+ "{0,-20} {1,-7} {2,-20}\n",
+ es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner));
+
+ MainConsole.Instance.Output(report.ToString());
+ }
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 54d3c61..57ab135 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -31,6 +31,7 @@ using System.IO;
using System.Reflection;
using System.Security;
using log4net;
+using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
@@ -39,15 +40,17 @@ using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Estate
{
- public class EstateManagementModule : IEstateModule
+ [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EstateManagementModule")]
+ public class EstateManagementModule : IEstateModule, INonSharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private delegate void LookupUUIDS(List uuidLst);
public Scene Scene { get; private set; }
+ public IUserManagement UserManager { get; private set; }
- protected EstateManagementCommands m_commands;
+ protected EstateManagementCommands m_commands;
private EstateTerrainXferHandler TerrainUploader;
@@ -895,9 +898,15 @@ namespace OpenSim.Region.CoreModules.World.Estate
#endregion
#region IRegionModule Members
+
+ public string Name { get { return "EstateManagementModule"; } }
+
+ public Type ReplaceableInterface { get { return null; } }
- public void Initialise(Scene scene, IConfigSource source)
- {
+ public void Initialise(IConfigSource source) {}
+
+ public void AddRegion(Scene scene)
+ {
Scene = scene;
Scene.RegisterModuleInterface(this);
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
@@ -906,26 +915,21 @@ namespace OpenSim.Region.CoreModules.World.Estate
m_commands = new EstateManagementCommands(this);
m_commands.Initialise();
}
-
- public void PostInitialise()
+
+ public void RemoveRegion(Scene scene) {}
+
+ public void RegionLoaded(Scene scene)
{
// Sets up the sun module based no the saved Estate and Region Settings
// DO NOT REMOVE or the sun will stop working
- Scene.TriggerEstateSunUpdate();
- }
-
- public void Close()
- {
- }
-
- public string Name
- {
- get { return "EstateManagementModule"; }
+ scene.TriggerEstateSunUpdate();
+
+ UserManager = scene.RequestModuleInterface();
}
- public bool IsSharedModule
+ public void Close()
{
- get { return false; }
+ m_commands.Close();
}
#endregion
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
index c850f7f..721f0ee 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.Framework.Interfaces
public delegate void ChangeDelegate(UUID regionID);
public delegate void MessageDelegate(UUID regionID, UUID fromID, string fromName, string message);
- public interface IEstateModule : IRegionModule
+ public interface IEstateModule
{
event ChangeDelegate OnRegionInfoChange;
event ChangeDelegate OnEstateInfoChange;
--
cgit v1.1
From 03d82a5a8524cfba07d95456d59be6f35ab72048 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 12 Feb 2011 01:08:56 +0000
Subject: Fix bug where "My estate" name was always used even if the user
entered a different name on initial setup.
Turns out we had stopped saving estate settings immediately after the name change. The scene constructor then reloade the settings and oblitereted the different name.
This code could be more efficient since there's no reason for scene to reload the settings when they are already known to be valid.
Thanks to Thoneve for the spot on this.
---
OpenSim/Region/Application/OpenSimBase.cs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 1652b82..e950613 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -795,9 +795,7 @@ namespace OpenSim
///
/// Load the estate information for the provided RegionInfo object.
///
- ///
- /// A
- ///
+ ///
public void PopulateRegionEstateInfo(RegionInfo regInfo)
{
IEstateDataService estateDataService = EstateDataService;
@@ -819,7 +817,13 @@ namespace OpenSim
regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true);
regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
- //regInfo.EstateSettings.Save();
+
+ // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
+ // Therefore, we need to do an initial save here otherwise the new estate name will be reset
+ // back to the default. The reloading of estate settings by scene could be eliminated if it
+ // knows that the passed in settings in RegionInfo are already valid. Also, it might be
+ // possible to eliminate some additional later saves made by callers of this method.
+ regInfo.EstateSettings.Save();
break;
}
else
--
cgit v1.1
From 9801bf03f8ab59e1fe8d439a216ca48a5bd68dc7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 12 Feb 2011 01:14:12 +0000
Subject: minor: add comment explaining that GetRegionsByName needs to stay in
TeleportAgent for its side effects.
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 3f8735e..688dfe4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -702,6 +702,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// and convert the regionName to the target region
if (regionName.Contains(".") && regionName.Contains(":"))
{
+ // Even though we use none of the results, we need to perform this call because it appears
+ // to have some the side effect of setting up hypergrid teleport locations.
World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
--
cgit v1.1
From a8ced66e873d09bd1c9fd0cfe5d0487bf0ee27e7 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 12 Feb 2011 07:28:21 -0800
Subject: Improved error message on TP failure
---
.../Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 80a8041..1337143 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
catch (Exception e)
{
- m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace);
+ m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0} {1}", e.Message, e.StackTrace);
sp.ControllingClient.SendTeleportFailed("Internal error");
}
}
--
cgit v1.1
From ba03e2e262191cc37da7cfaba544336aa9e85bd4 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 12 Feb 2011 20:59:09 +0100
Subject: Add the country functions in the careminster API
---
.../Shared/Api/Implementation/CM_Api.cs | 118 +++++++++++++++++++++
.../ScriptEngine/Shared/Api/Interface/ICM_Api.cs | 46 ++++++++
.../ScriptEngine/Shared/Api/Runtime/CM_Stub.cs | 71 +++++++++++++
3 files changed, 235 insertions(+)
create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs
create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs
create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs
new file mode 100644
index 0000000..489c1c6
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Reflection;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.Remoting.Lifetime;
+using OpenMetaverse;
+using Nini.Config;
+using OpenSim;
+using OpenSim.Framework;
+using OpenSim.Region.CoreModules.World.LightShare;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.ScriptEngine.Shared;
+using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
+using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
+using OpenSim.Region.ScriptEngine.Interfaces;
+using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
+using OpenSim.Services.Interfaces;
+
+using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
+using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
+using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
+using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
+
+namespace OpenSim.Region.ScriptEngine.Shared.Api
+{
+ [Serializable]
+ public class CM_Api : MarshalByRefObject, ICM_Api, IScriptApi
+ {
+ internal IScriptEngine m_ScriptEngine;
+ internal SceneObjectPart m_host;
+ internal uint m_localID;
+ internal UUID m_itemID;
+ internal bool m_CMFunctionsEnabled = false;
+
+ public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
+ {
+ m_ScriptEngine = ScriptEngine;
+ m_host = host;
+ m_localID = localID;
+ m_itemID = itemID;
+
+ if (m_ScriptEngine.Config.GetBoolean("AllowCareminsterFunctions", false))
+ m_CMFunctionsEnabled = true;
+ }
+
+ public override Object InitializeLifetimeService()
+ {
+ ILease lease = (ILease)base.InitializeLifetimeService();
+
+ if (lease.CurrentState == LeaseState.Initial)
+ {
+ lease.InitialLeaseTime = TimeSpan.FromMinutes(0);
+ // lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0);
+ // lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0);
+ }
+ return lease;
+ }
+
+ public Scene World
+ {
+ get { return m_ScriptEngine.World; }
+ }
+
+ public string cmDetectedCountry(int number)
+ {
+ m_host.AddScriptLPS(1);
+ DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, number);
+ if (detectedParams == null)
+ return String.Empty;
+ return detectedParams.Country;
+ }
+
+ public string cmGetAgentCountry(LSL_Key key)
+ {
+ if (!World.Permissions.IsGod(m_host.OwnerID))
+ return String.Empty;
+
+ UUID uuid;
+
+ if (!UUID.TryParse(key, out uuid))
+ return String.Empty;
+
+ UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid);
+ return account.UserCountry;
+ }
+ }
+}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs
new file mode 100644
index 0000000..ab215f3
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System.Collections;
+using OpenSim.Region.ScriptEngine.Interfaces;
+
+using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
+using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
+using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
+using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
+
+namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
+{
+ public interface ICM_Api
+ {
+ string cmDetectedCountry(int num);
+ string cmGetAgentCountry(key key);
+ }
+}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs
new file mode 100644
index 0000000..4132dfa
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Runtime.Remoting.Lifetime;
+using System.Threading;
+using System.Reflection;
+using System.Collections;
+using System.Collections.Generic;
+using OpenSim.Framework;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.ScriptEngine.Interfaces;
+using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
+using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
+using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
+using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
+using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
+using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+
+namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
+{
+ public partial class ScriptBaseClass : MarshalByRefObject
+ {
+ public ICM_Api m_CM_Functions;
+
+ public void ApiTypeCM(IScriptApi api)
+ {
+ if (!(api is ICM_Api))
+ return;
+
+ m_CM_Functions = (ICM_Api)api;
+ }
+
+ public string cmDetectedCountry(int num)
+ {
+ return m_CM_Functions.cmDetectedCountry(num);
+ }
+
+ public string cmGetAgentCountry(key key)
+ {
+ return m_CM_Functions.cmGetAgentCountry(key);
+ }
+ }
+}
--
cgit v1.1
From c75e916ccfb195554c5010ab4187c4d74b81c4e1 Mon Sep 17 00:00:00 2001
From: BlueWall
Date: Sun, 13 Feb 2011 00:30:43 -0500
Subject: Set filter to send proper rotations for root part
This allows the root prim, alone or in a set, to send it's
rotation. This fixes unsitting the avatar on sit-offsest
type teleports where the sit target is in the root prim of
a linkset.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6a92378..4d5eedf 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2099,7 +2099,7 @@ namespace OpenSim.Region.Framework.Scenes
{
Quaternion newRot;
- if (this.LinkNum == 0)
+ if (this.LinkNum == 0 || this.LinkNum == 1)
{
newRot = RotationOffset;
}
--
cgit v1.1
From cfce0aa4482c50e3046ae44fe76d71fb70c82201 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 16 Feb 2011 05:22:05 +0100
Subject: Change the QUERYACCESS method to eliminate spurious access denied
messages
---
.../Framework/EntityTransfer/EntityTransferModule.cs | 10 +++++-----
.../Simulation/LocalSimulationConnector.cs | 5 +++--
.../Simulation/RemoteSimulationConnector.cs | 7 ++++---
OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++--
4 files changed, 16 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index e8f18e7..51897d7 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -285,9 +285,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
- if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
+ string reason;
+ if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out reason))
{
- sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
+ sp.ControllingClient.SendTeleportFailed("Teleport failed: " + reason);
return;
}
@@ -324,8 +325,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
}
- string reason = String.Empty;
-
// Let's create an agent there if one doesn't exist yet.
bool logout = false;
if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout))
@@ -797,7 +796,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
- if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
+ string reason;
+ if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos, out reason))
{
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
if (r == null)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 9363714..41dbffb 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -257,15 +257,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
+ reason = "Communications failure";
if (destination == null)
return false;
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionID == destination.RegionID)
- return s.QueryAccess(id, position);
+ return s.QueryAccess(id, position, out reason);
}
return false;
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index e8a6629..e1eee3b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -239,18 +239,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
}
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
+ reason = "Communications failure";
if (destination == null)
return false;
// Try local first
- if (m_localBackend.QueryAccess(destination, id, position))
+ if (m_localBackend.QueryAccess(destination, id, position, out reason))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
- return m_remoteConnector.QueryAccess(destination, id, position);
+ return m_remoteConnector.QueryAccess(destination, id, position, out reason);
return false;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 171d637..f38a6fc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5145,9 +5145,9 @@ namespace OpenSim.Region.Framework.Scenes
// from logging into the region, teleporting into the region
// or corssing the broder walking, but will NOT prevent
// child agent creation, thereby emulating the SL behavior.
- public bool QueryAccess(UUID agentID, Vector3 position)
+ public bool QueryAccess(UUID agentID, Vector3 position, out string reason)
{
- string reason;
+ reason = "You are banned from the region";
if (!AuthorizeUser(agentID, out reason))
{
@@ -5178,6 +5178,8 @@ namespace OpenSim.Region.Framework.Scenes
if (banned || restricted)
return false;
}
+
+ reason = String.Empty;
return true;
}
}
--
cgit v1.1
From 3f93db83711956dbef8870d5b997e3bc12d16c46 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 16 Feb 2011 05:23:30 +0100
Subject: Streamline ban line processing. Remove remnants of old advisory
messages. Centralize ban checking and prepare for adding a "ban and eject"
function.
---
.../CoreModules/World/Land/LandManagementModule.cs | 82 +++++++---------------
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 -
2 files changed, 24 insertions(+), 59 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index b671aec..ad75ea5 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -163,13 +163,6 @@ namespace OpenSim.Region.CoreModules.World.Land
m_scene.UnregisterModuleCommander(m_commander.Name);
}
-// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
-// {
-// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y);
-// reason = "You are not allowed to enter this sim.";
-// return nearestParcel != null;
-// }
-
///
/// Processes commandline input. Do not call directly.
///
@@ -364,31 +357,7 @@ namespace OpenSim.Region.CoreModules.World.Land
}
if (parcelAvatarIsEntering != null)
- {
- if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
- {
- if (parcelAvatarIsEntering.IsEitherBannedOrRestricted(avatar.UUID))
- {
- SendYouAreBannedNotice(avatar);
- ForceAvatarToPosition(avatar, avatar.lastKnownAllowedPosition);
- //ForceAvatarToPosition(avatar, m_scene.GetNearestAllowedPosition(avatar));
- }
- else if (parcelAvatarIsEntering.IsRestrictedFromLand(avatar.UUID))
- {
- SendYouAreRestrictedNotice(avatar);
- ForceAvatarToPosition(avatar, avatar.lastKnownAllowedPosition);
- //ForceAvatarToPosition(avatar, m_scene.GetNearestAllowedPosition(avatar));
- }
- else
- {
- avatar.sentMessageAboutRestrictedParcelFlyingDown = true;
- }
- }
- else
- {
- avatar.sentMessageAboutRestrictedParcelFlyingDown = true;
- }
- }
+ EnforceBans(parcelAvatarIsEntering, avatar);
}
}
@@ -460,32 +429,7 @@ namespace OpenSim.Region.CoreModules.World.Land
SendOutNearestBanLine(remote_client);
ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
if (parcel != null)
- {
- if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
- clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
- {
- EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
- m_scene.RegionInfo.RegionID);
- //They are going under the safety line!
- if (!parcel.IsBannedFromLand(clientAvatar.UUID))
- {
- clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
- }
- }
- else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
- parcel.IsBannedFromLand(clientAvatar.UUID))
- {
- // SendYouAreBannedNotice(clientAvatar);
- //ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
- ForceAvatarToPosition(clientAvatar, clientAvatar.lastKnownAllowedPosition);
- }
- else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
- {
- // SendYouAreRestrictedNotice(clientAvatar);
- //ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
- ForceAvatarToPosition(clientAvatar, clientAvatar.lastKnownAllowedPosition);
- }
- }
+ EnforceBans(parcel, clientAvatar);
}
}
@@ -2005,5 +1949,27 @@ namespace OpenSim.Region.CoreModules.World.Land
MainConsole.Instance.Output(report.ToString());
}
+
+ public void EnforceBans(ILandObject land, ScenePresence avatar)
+ {
+ if (avatar.AbsolutePosition.Z > LandChannel.BAN_LINE_SAFETY_HIEGHT)
+ return;
+
+ if (land.IsEitherBannedOrRestricted(avatar.UUID))
+ {
+ if (land.ContainsPoint(Convert.ToInt32(avatar.lastKnownAllowedPosition.X), Convert.ToInt32(avatar.lastKnownAllowedPosition.Y)))
+ {
+ Vector3? pos = m_scene.GetNearestAllowedPosition(avatar);
+ if (pos == null)
+ m_scene.TeleportClientHome(avatar.UUID, avatar.ControllingClient);
+ else
+ ForceAvatarToPosition(avatar, (Vector3)pos);
+ }
+ else
+ {
+ ForceAvatarToPosition(avatar, avatar.lastKnownAllowedPosition);
+ }
+ }
+ }
}
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b54d1b8..af24ed3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -123,7 +123,6 @@ namespace OpenSim.Region.Framework.Scenes
private SceneObjectGroup proxyObjectGroup;
//private SceneObjectPart proxyObjectPart = null;
public Vector3 lastKnownAllowedPosition;
- public bool sentMessageAboutRestrictedParcelFlyingDown;
public Vector4 CollisionPlane = Vector4.UnitW;
private Vector3 m_avInitialPos; // used to calculate unscripted sit rotation
--
cgit v1.1
From 918c12c965e822457807563acd4e16638a6bd3cc Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 16 Feb 2011 08:06:11 +0000
Subject: Change the QUERYACCESS method to eliminate spurious access denied
messages
---
.../Framework/EntityTransfer/EntityTransferModule.cs | 10 +++++-----
.../Simulation/LocalSimulationConnector.cs | 5 +++--
.../Simulation/RemoteSimulationConnector.cs | 7 ++++---
OpenSim/Region/Framework/Scenes/Scene.cs | 3 ++-
4 files changed, 14 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 1337143..98aa563 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -284,9 +284,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
- if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
+ string reason;
+ if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out reason))
{
- sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
+ sp.ControllingClient.SendTeleportFailed("Teleport failed: " + reason);
return;
}
@@ -323,8 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
}
- string reason = String.Empty;
-
// Let's create an agent there if one doesn't exist yet.
bool logout = false;
if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout))
@@ -778,7 +777,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
- if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
+ string reason;
+ if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos, out reason))
{
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
if (r == null)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 56720b7..a298b65 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -257,15 +257,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
+ reason = "Communications failure";
if (destination == null)
return false;
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionID == destination.RegionID)
- return s.QueryAccess(id, position);
+ return s.QueryAccess(id, position, out reason);
}
//m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
return false;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index c4919b3..0c92bd1 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -239,18 +239,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
}
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
+ reason = "Communications failure";
if (destination == null)
return false;
// Try local first
- if (m_localBackend.QueryAccess(destination, id, position))
+ if (m_localBackend.QueryAccess(destination, id, position, out reason))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
- return m_remoteConnector.QueryAccess(destination, id, position);
+ return m_remoteConnector.QueryAccess(destination, id, position, out reason);
return false;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 355671c..2fd6b52 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4923,8 +4923,9 @@ namespace OpenSim.Region.Framework.Scenes
// from logging into the region, teleporting into the region
// or corssing the broder walking, but will NOT prevent
// child agent creation, thereby emulating the SL behavior.
- public bool QueryAccess(UUID agentID, Vector3 position)
+ public bool QueryAccess(UUID agentID, Vector3 position, out string reason)
{
+ reason = String.Empty;
return true;
}
}
--
cgit v1.1
From 25265c964f22a34fa3757ae487c15744f1da5850 Mon Sep 17 00:00:00 2001
From: Marck
Date: Wed, 16 Feb 2011 18:34:44 +0100
Subject: Changed console command "alert" and added new command "alert-user".
This addresses Mantis #4709.
Command "alert" always sends a message to everybody; the variant "alert general" has been removed. Sending messages to one user is done with the dedicated command "alert-user".
---
.../CoreModules/Avatar/Dialog/DialogModule.cs | 60 +++++++---------------
1 file changed, 18 insertions(+), 42 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 2b3d2a9..8a977c9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -49,16 +49,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
{
m_scene = scene;
m_scene.RegisterModuleInterface(this);
-
+
m_scene.AddCommand(
- this, "alert", "alert ",
- "Send an alert to a user",
+ this, "alert", "alert ",
+ "Send an alert to everyone",
HandleAlertConsoleCommand);
m_scene.AddCommand(
- this, "alert general", "alert [general] ",
- "Send an alert to everyone",
- "If keyword 'general' is omitted, then must be surrounded by quotation marks.",
+ this, "alert-user", "alert-user ",
+ "Send an alert to a user",
HandleAlertConsoleCommand);
}
@@ -177,55 +176,32 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
{
if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
return;
-
- bool isGeneral = false;
- string firstName = string.Empty;
- string lastName = string.Empty;
+
string message = string.Empty;
- if (cmdparams.Length > 1)
- {
- firstName = cmdparams[1];
- isGeneral = firstName.ToLower().Equals("general");
- }
- if (cmdparams.Length == 2 && !isGeneral)
+ if (cmdparams[0].ToLower().Equals("alert"))
{
- // alert "message"
- message = cmdparams[1];
- isGeneral = true;
- }
- else if (cmdparams.Length > 2 && isGeneral)
- {
- // alert general
- message = CombineParams(cmdparams, 2);
+ message = CombineParams(cmdparams, 1);
+ m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}",
+ m_scene.RegionInfo.RegionName, message);
+ SendGeneralAlert(message);
}
else if (cmdparams.Length > 3)
{
- // alert
- lastName = cmdparams[2];
+ string firstName = cmdparams[1];
+ string lastName = cmdparams[2];
message = CombineParams(cmdparams, 3);
+ m_log.InfoFormat(
+ "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
+ m_scene.RegionInfo.RegionName, firstName, lastName, message);
+ SendAlertToUser(firstName, lastName, message, false);
}
else
{
OpenSim.Framework.Console.MainConsole.Instance.Output(
- "Usage: alert \"message\" | alert general | alert ");
+ "Usage: alert | alert-user ");
return;
}
-
- if (isGeneral)
- {
- m_log.InfoFormat(
- "[DIALOG]: Sending general alert in region {0} with message {1}",
- m_scene.RegionInfo.RegionName, message);
- SendGeneralAlert(message);
- }
- else
- {
- m_log.InfoFormat(
- "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
- m_scene.RegionInfo.RegionName, firstName, lastName, message);
- SendAlertToUser(firstName, lastName, message, false);
- }
}
private string CombineParams(string[] commandParams, int pos)
--
cgit v1.1
From 47a5d8d7420f86088d75e4b578e7e997ba2d11c8 Mon Sep 17 00:00:00 2001
From: Marck
Date: Fri, 21 Jan 2011 19:55:35 +0100
Subject: Make osTeleportOwner work in foreign regions by relaxing the
restrictions on teleporting an agent.
---
.../Shared/Api/Implementation/OSSL_Api.cs | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 688dfe4..402d3a5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -681,10 +681,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
- TeleportAgent(agent, regionName, position, lookat);
+ TeleportAgent(agent, regionName, position, lookat, false);
}
- private void TeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
+ private void TeleportAgent(string agent, string regionName,
+ LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions)
{
m_host.AddScriptLPS(1);
UUID agentId = new UUID();
@@ -694,7 +695,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (presence != null)
{
// agent must be over owners land to avoid abuse
- if (m_host.OwnerID
+ if (relaxRestrictions ||
+ m_host.OwnerID
== World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{
@@ -728,10 +730,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
- TeleportAgent(agent, regionX, regionY, position, lookat);
+ TeleportAgent(agent, regionX, regionY, position, lookat, false);
}
- private void TeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
+ private void TeleportAgent(string agent, int regionX, int regionY,
+ LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions)
{
ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
@@ -742,8 +745,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null)
{
- // agent must be over owners land to avoid abuse
- if (m_host.OwnerID
+ // For osTeleportAgent, agent must be over owners land to avoid abuse
+ // For osTeleportOwner, this restriction isn't necessary
+ if (relaxRestrictions ||
+ m_host.OwnerID
== World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{
@@ -766,7 +771,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// Threat level None because this is what can already be done with the World Map in the viewer
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
- TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat);
+ TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat, true);
}
public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
@@ -778,7 +783,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
- TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat);
+ TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat, true);
}
// Functions that get information from the agent itself.
--
cgit v1.1
From 4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93 Mon Sep 17 00:00:00 2001
From: Marck
Date: Fri, 21 Jan 2011 20:00:04 +0100
Subject: Add support for new naming syntax of linked regions to
osTeleportAgent and osTeleportOwner.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 6 +++---
.../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 17 ++---------------
2 files changed, 5 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2fd6b52..02a0268 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3770,15 +3770,15 @@ namespace OpenSim.Region.Framework.Scenes
public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position,
Vector3 lookat, uint teleportFlags)
{
- GridRegion regionInfo = GridService.GetRegionByName(UUID.Zero, regionName);
- if (regionInfo == null)
+ List regions = GridService.GetRegionsByName(RegionInfo.ScopeID, regionName, 1);
+ if (regions == null || regions.Count == 0)
{
// can't find the region: Tell viewer and abort
remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found.");
return;
}
- RequestTeleportLocation(remoteClient, regionInfo.RegionHandle, position, lookat, teleportFlags);
+ RequestTeleportLocation(remoteClient, regions[0].RegionHandle, position, lookat, teleportFlags);
}
///
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 402d3a5..64931d0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -694,26 +694,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null)
{
- // agent must be over owners land to avoid abuse
+ // For osTeleportAgent, agent must be over owners land to avoid abuse
+ // For osTeleportOwner, this restriction isn't necessary
if (relaxRestrictions ||
m_host.OwnerID
== World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{
- // Check for hostname, attempt to make a HG link,
- // and convert the regionName to the target region
- if (regionName.Contains(".") && regionName.Contains(":"))
- {
- // Even though we use none of the results, we need to perform this call because it appears
- // to have some the side effect of setting up hypergrid teleport locations.
- World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
-// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
-
- string[] parts = regionName.Split(new char[] { ':' });
- if (parts.Length > 2)
- regionName = parts[0] + ':' + parts[1] + "/ " + parts[2];
- regionName = "http://" + regionName;
- }
World.RequestTeleportLocation(presence.ControllingClient, regionName,
new Vector3((float)position.x, (float)position.y, (float)position.z),
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);
--
cgit v1.1
From c79f79fc8487ed2c4a7e1b77679f6e0d7b8fa17d Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 17 Feb 2011 18:49:03 +0100
Subject: Add needed dummy to sample money
---
OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index b84a34d..d469548 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -838,6 +838,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
if (module != null)
module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
}
+
+ public void MoveMoney(UUID fromAgentID, UUID toAgentID, int amount, string text)
+ {
+ }
}
public enum TransactionType : int
--
cgit v1.1
From 47252214354cb768ecddb50062d650d22f7d1c4f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 20:54:00 +0000
Subject: Stop the avatar sometimes pausing for more than a second on the
border when region crossing.
This restores a RemoveFromPhysicalScene() call in ScenePresence.CheckForBorderCrossing() when the agent has been placed in transit.
If we don't remove the agent from the physical scene, then the method continues to be called via ScenePresence.Update()
until the handover of the client between regions is completed. Since this handover can take more than 1000ms (due to the 1000ms
event queue polling response from the server), this results in the avatar pausing on the border for the entire handover period.
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cd70de8..4150f4a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2776,6 +2776,13 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
+ // We must remove the agent from the physical scene if it has been placed in transit. If we don't,
+ // then this method continues to be called from ScenePresence.Update() until the handover of the client between
+ // regions is completed. Since this handover can take more than 1000ms (due to the 1000ms
+ // event queue polling response from the server), this results in the avatar pausing on the border
+ // for the handover period.
+ RemoveFromPhysicalScene();
+
// This constant has been inferred from experimentation
// I'm not sure what this value should be, so I tried a few values.
timeStep = 0.04f;
--
cgit v1.1
From e774679f62dc0de54c1926b1b4a611ca317d2bd7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 21:19:16 +0000
Subject: minor: add method doc to a few ScenePresence methods
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 4150f4a..b47ec3c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2652,8 +2652,11 @@ namespace OpenSim.Region.Framework.Scenes
#region Border Crossing Methods
///
- /// Checks to see if the avatar is in range of a border and calls CrossToNewRegion
+ /// Starts the process of moving an avatar into another region if they are crossing the border.
///
+ ///
+ /// Also removes the avatar from the physical scene if transit has started.
+ ///
protected void CheckForBorderCrossing()
{
if (IsChildAgent)
@@ -2721,7 +2724,6 @@ namespace OpenSim.Region.Framework.Scenes
neighbor = HaveNeighbor(Cardinals.N, ref fix);
}
-
// Makes sure avatar does not end up outside region
if (neighbor <= 0)
{
@@ -2794,6 +2796,15 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ ///
+ /// Checks whether this region has a neighbour in the given direction.
+ ///
+ ///
+ ///
+ ///
+ /// An integer which represents a compass point. N == 1, going clockwise until we reach NW == 8.
+ /// Returns a positive integer if there is a region in that direction, a negative integer if not.
+ ///
protected int HaveNeighbor(Cardinals car, ref int[] fix)
{
uint neighbourx = m_regionInfo.RegionLocX;
--
cgit v1.1
From 88da253c947c78e97f78119203e3c2f216a788e2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 21:54:44 +0000
Subject: Add very basic test which invokes the scene update loop once and
checks the frame number.
This makes Scene.Update() match its original description of performing a single update, which also matches the semantics of SOG and ScenePresence.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 307 ++++++++++-----------
.../Framework/Scenes/Tests/ScenePresenceTests.cs | 3 -
.../Region/Framework/Scenes/Tests/SceneTests.cs | 71 +++++
3 files changed, 224 insertions(+), 157 deletions(-)
create mode 100644 OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 02a0268..e0af2d6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -129,7 +129,16 @@ namespace OpenSim.Region.Framework.Scenes
protected ICapabilitiesModule m_capsModule;
// Central Update Loop
protected int m_fps = 10;
- protected uint m_frame;
+
+ ///
+ /// Current scene frame number
+ ///
+ public uint Frame
+ {
+ get;
+ protected set;
+ }
+
protected float m_timespan = 0.089f;
protected DateTime m_lastupdate = DateTime.UtcNow;
@@ -1183,7 +1192,8 @@ namespace OpenSim.Region.Framework.Scenes
try
{
- Update();
+ while (!shuttingdown)
+ Update();
m_lastUpdate = Util.EnvironmentTickCount();
m_firstHeartbeat = false;
@@ -1200,187 +1210,176 @@ namespace OpenSim.Region.Framework.Scenes
Watchdog.RemoveThread();
}
- ///
- /// Performs per-frame updates on the scene, this should be the central scene loop
- ///
public override void Update()
- {
- float physicsFPS;
- int maintc;
+ {
+ TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate;
+ float physicsFPS = 0f;
- while (!shuttingdown)
+ int maintc = Util.EnvironmentTickCount();
+ int tmpFrameMS = maintc;
+ tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0;
+
+ // Increment the frame counter
+ ++Frame;
+
+ try
{
- TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate;
- physicsFPS = 0f;
+ // Check if any objects have reached their targets
+ CheckAtTargets();
- maintc = Util.EnvironmentTickCount();
- int tmpFrameMS = maintc;
- tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0;
+ // Update SceneObjectGroups that have scheduled themselves for updates
+ // Objects queue their updates onto all scene presences
+ if (Frame % m_update_objects == 0)
+ m_sceneGraph.UpdateObjectGroups();
- // Increment the frame counter
- ++m_frame;
+ // Run through all ScenePresences looking for updates
+ // Presence updates and queued object updates for each presence are sent to clients
+ if (Frame % m_update_presences == 0)
+ m_sceneGraph.UpdatePresences();
- try
+ // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
+ if (Frame % m_update_coarse_locations == 0)
{
- // Check if any objects have reached their targets
- CheckAtTargets();
-
- // Update SceneObjectGroups that have scheduled themselves for updates
- // Objects queue their updates onto all scene presences
- if (m_frame % m_update_objects == 0)
- m_sceneGraph.UpdateObjectGroups();
+ List coarseLocations;
+ List avatarUUIDs;
+ SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60);
+ // Send coarse locations to clients
+ ForEachScenePresence(delegate(ScenePresence presence)
+ {
+ presence.SendCoarseLocations(coarseLocations, avatarUUIDs);
+ });
+ }
- // Run through all ScenePresences looking for updates
- // Presence updates and queued object updates for each presence are sent to clients
- if (m_frame % m_update_presences == 0)
- m_sceneGraph.UpdatePresences();
+ int tmpPhysicsMS2 = Util.EnvironmentTickCount();
+ if ((Frame % m_update_physics == 0) && m_physics_enabled)
+ m_sceneGraph.UpdatePreparePhysics();
+ physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
- // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
- if (m_frame % m_update_coarse_locations == 0)
- {
- List coarseLocations;
- List avatarUUIDs;
- SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60);
- // Send coarse locations to clients
- ForEachScenePresence(delegate(ScenePresence presence)
- {
- presence.SendCoarseLocations(coarseLocations, avatarUUIDs);
- });
- }
+ // Apply any pending avatar force input to the avatar's velocity
+ if (Frame % m_update_entitymovement == 0)
+ m_sceneGraph.UpdateScenePresenceMovement();
- int tmpPhysicsMS2 = Util.EnvironmentTickCount();
- if ((m_frame % m_update_physics == 0) && m_physics_enabled)
- m_sceneGraph.UpdatePreparePhysics();
- physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
+ // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
+ // velocity
+ int tmpPhysicsMS = Util.EnvironmentTickCount();
+ if (Frame % m_update_physics == 0)
+ {
+ if (m_physics_enabled)
+ physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, m_timespan));
+ if (SynchronizeScene != null)
+ SynchronizeScene(this);
+ }
+ physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
- // Apply any pending avatar force input to the avatar's velocity
- if (m_frame % m_update_entitymovement == 0)
- m_sceneGraph.UpdateScenePresenceMovement();
+ // Delete temp-on-rez stuff
+ if (Frame % 1000 == 0 && !m_cleaningTemps)
+ {
+ int tmpTempOnRezMS = Util.EnvironmentTickCount();
+ m_cleaningTemps = true;
+ Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
+ tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS);
+ }
- // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
- // velocity
- int tmpPhysicsMS = Util.EnvironmentTickCount();
- if (m_frame % m_update_physics == 0)
+ if (RegionStatus != RegionStatus.SlaveScene)
+ {
+ if (Frame % m_update_events == 0)
{
- if (m_physics_enabled)
- physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, m_timespan));
- if (SynchronizeScene != null)
- SynchronizeScene(this);
+ int evMS = Util.EnvironmentTickCount();
+ UpdateEvents();
+ eventMS = Util.EnvironmentTickCountSubtract(evMS); ;
}
- physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
- // Delete temp-on-rez stuff
- if (m_frame % 1000 == 0 && !m_cleaningTemps)
+ if (Frame % m_update_backup == 0)
{
- int tmpTempOnRezMS = Util.EnvironmentTickCount();
- m_cleaningTemps = true;
- Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
- tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS);
+ int backMS = Util.EnvironmentTickCount();
+ UpdateStorageBackup();
+ backupMS = Util.EnvironmentTickCountSubtract(backMS);
}
- if (RegionStatus != RegionStatus.SlaveScene)
+ if (Frame % m_update_terrain == 0)
{
- if (m_frame % m_update_events == 0)
- {
- int evMS = Util.EnvironmentTickCount();
- UpdateEvents();
- eventMS = Util.EnvironmentTickCountSubtract(evMS); ;
- }
-
- if (m_frame % m_update_backup == 0)
- {
- int backMS = Util.EnvironmentTickCount();
- UpdateStorageBackup();
- backupMS = Util.EnvironmentTickCountSubtract(backMS);
- }
+ int terMS = Util.EnvironmentTickCount();
+ UpdateTerrain();
+ terrainMS = Util.EnvironmentTickCountSubtract(terMS);
+ }
- if (m_frame % m_update_terrain == 0)
- {
- int terMS = Util.EnvironmentTickCount();
- UpdateTerrain();
- terrainMS = Util.EnvironmentTickCountSubtract(terMS);
- }
+ //if (Frame % m_update_land == 0)
+ //{
+ // int ldMS = Util.EnvironmentTickCount();
+ // UpdateLand();
+ // landMS = Util.EnvironmentTickCountSubtract(ldMS);
+ //}
- //if (m_frame % m_update_land == 0)
- //{
- // int ldMS = Util.EnvironmentTickCount();
- // UpdateLand();
- // landMS = Util.EnvironmentTickCountSubtract(ldMS);
- //}
+ frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
+ otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
+ lastCompletedFrame = Util.EnvironmentTickCount();
+
+ // if (Frame%m_update_avatars == 0)
+ // UpdateInWorldTime();
+ StatsReporter.AddPhysicsFPS(physicsFPS);
+ StatsReporter.AddTimeDilation(TimeDilation);
+ StatsReporter.AddFPS(1);
+ StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
+ StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
+ StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
+ StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
+ StatsReporter.addFrameMS(frameMS);
+ StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
+ StatsReporter.addOtherMS(otherMS);
+ StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
+ StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
+ }
- frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
- otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
- lastCompletedFrame = Util.EnvironmentTickCount();
-
- // if (m_frame%m_update_avatars == 0)
- // UpdateInWorldTime();
- StatsReporter.AddPhysicsFPS(physicsFPS);
- StatsReporter.AddTimeDilation(TimeDilation);
- StatsReporter.AddFPS(1);
- StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
- StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
- StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
- StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
- StatsReporter.addFrameMS(frameMS);
- StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
- StatsReporter.addOtherMS(otherMS);
- StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
- StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
- }
+ if (LoginsDisabled && Frame == 20)
+ {
+ // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
+ // this is a rare case where we know we have just went through a long cycle of heap
+ // allocations, and there is no more work to be done until someone logs in
+ GC.Collect();
- if (LoginsDisabled && m_frame == 20)
+ IConfig startupConfig = m_config.Configs["Startup"];
+ if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
{
- // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
- // this is a rare case where we know we have just went through a long cycle of heap
- // allocations, and there is no more work to be done until someone logs in
- GC.Collect();
-
- IConfig startupConfig = m_config.Configs["Startup"];
- if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
- {
- m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
- LoginsDisabled = false;
- m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface(), RegionInfo);
- }
+ m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
+ LoginsDisabled = false;
+ m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface(), RegionInfo);
}
}
- catch (NotImplementedException)
- {
- throw;
- }
- catch (AccessViolationException e)
- {
- m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- //catch (NullReferenceException e)
- //{
- // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- //}
- catch (InvalidOperationException e)
- {
- m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- catch (Exception e)
- {
- m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- finally
- {
- m_lastupdate = DateTime.UtcNow;
- }
-
- maintc = Util.EnvironmentTickCountSubtract(maintc);
- maintc = (int)(m_timespan * 1000) - maintc;
+ }
+ catch (NotImplementedException)
+ {
+ throw;
+ }
+ catch (AccessViolationException e)
+ {
+ m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
+ }
+ //catch (NullReferenceException e)
+ //{
+ // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
+ //}
+ catch (InvalidOperationException e)
+ {
+ m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
+ }
+ catch (Exception e)
+ {
+ m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
+ }
+ finally
+ {
+ m_lastupdate = DateTime.UtcNow;
+ }
- if (maintc > 0)
- Thread.Sleep(maintc);
+ maintc = Util.EnvironmentTickCountSubtract(maintc);
+ maintc = (int)(m_timespan * 1000) - maintc;
- // Tell the watchdog that this thread is still alive
- Watchdog.UpdateThread();
- }
- }
+ if (maintc > 0)
+ Thread.Sleep(maintc);
-
+ // Tell the watchdog that this thread is still alive
+ Watchdog.UpdateThread();
+ }
public void AddGroupTarget(SceneObjectGroup grp)
{
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index ef52363..8286e4f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -116,9 +116,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
agent.ChildrenCapSeeds = new Dictionary();
agent.child = true;
- if (scene.PresenceService == null)
- Console.WriteLine("Presence Service is null");
-
scene.PresenceService.LoginAgent(agent.AgentID.ToString(), agent.SessionID, agent.SecureSessionID);
string reason;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
new file mode 100644
index 0000000..9aba8a8
--- /dev/null
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using System.Timers;
+using Timer=System.Timers.Timer;
+using Nini.Config;
+using NUnit.Framework;
+using NUnit.Framework.SyntaxHelpers;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.CoreModules.World.Serialiser;
+using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
+using OpenSim.Tests.Common;
+using OpenSim.Tests.Common.Mock;
+using OpenSim.Tests.Common.Setup;
+
+namespace OpenSim.Region.Framework.Scenes.Tests
+{
+ ///
+ /// Scene presence tests
+ ///
+ [TestFixture]
+ public class SceneTests
+ {
+ ///
+ /// Very basic scene update test. Should become more elaborate with time.
+ ///
+ [Test]
+ public void TestUpdateScene()
+ {
+ TestHelper.InMethod();
+
+ Scene scene = SceneSetupHelpers.SetupScene();
+ scene.Update();
+
+ Assert.That(scene.Frame, Is.EqualTo(1));
+ }
+ }
+}
\ No newline at end of file
--
cgit v1.1
From c763edf56dab869982b5ba002d798f147112a361 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 22:20:08 +0000
Subject: separate attachment tests out into their own class
---
.../Framework/Scenes/Tests/AttachmentTests.cs | 180 +++++++++++++++++++++
.../Framework/Scenes/Tests/ScenePresenceTests.cs | 50 ------
2 files changed, 180 insertions(+), 50 deletions(-)
create mode 100644 OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
new file mode 100644
index 0000000..60e47f6
--- /dev/null
+++ b/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using System.Timers;
+using Timer=System.Timers.Timer;
+using Nini.Config;
+using NUnit.Framework;
+using NUnit.Framework.SyntaxHelpers;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.CoreModules.World.Serialiser;
+using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
+using OpenSim.Tests.Common;
+using OpenSim.Tests.Common.Mock;
+using OpenSim.Tests.Common.Setup;
+
+namespace OpenSim.Region.Framework.Scenes.Tests
+{
+ ///
+ /// Scene presence tests
+ ///
+ [TestFixture]
+ public class AttachmentTests
+ {
+ public Scene scene, scene2;
+ public UUID agent1;
+ public static Random random;
+ public ulong region1, region2;
+ public AgentCircuitData acd1;
+ public SceneObjectGroup sog1, sog2, sog3;
+
+ [TestFixtureSetUp]
+ public void Init()
+ {
+ TestHelper.InMethod();
+
+ scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
+ scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
+
+ ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
+ interregionComms.Initialise(new IniConfigSource());
+ interregionComms.PostInitialise();
+ SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
+ SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
+
+ agent1 = UUID.Random();
+ random = new Random();
+ sog1 = NewSOG(UUID.Random(), scene, agent1);
+ sog2 = NewSOG(UUID.Random(), scene, agent1);
+ sog3 = NewSOG(UUID.Random(), scene, agent1);
+
+ //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
+ region1 = scene.RegionInfo.RegionHandle;
+ region2 = scene2.RegionInfo.RegionHandle;
+
+ SceneSetupHelpers.AddRootAgent(scene, agent1);
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ if (MainServer.Instance != null) MainServer.Instance.Stop();
+ }
+
+ [Test]
+ public void T030_TestAddAttachments()
+ {
+ TestHelper.InMethod();
+
+ ScenePresence presence = scene.GetScenePresence(agent1);
+
+ presence.AddAttachment(sog1);
+ presence.AddAttachment(sog2);
+ presence.AddAttachment(sog3);
+
+ Assert.That(presence.HasAttachments(), Is.True);
+ Assert.That(presence.ValidateAttachments(), Is.True);
+ }
+
+ [Test]
+ public void T031_RemoveAttachments()
+ {
+ TestHelper.InMethod();
+
+ ScenePresence presence = scene.GetScenePresence(agent1);
+ presence.RemoveAttachment(sog1);
+ presence.RemoveAttachment(sog2);
+ presence.RemoveAttachment(sog3);
+ Assert.That(presence.HasAttachments(), Is.False);
+ }
+
+ // I'm commenting this test because scene setup NEEDS InventoryService to
+ // be non-null
+ //[Test]
+ public void T032_CrossAttachments()
+ {
+ TestHelper.InMethod();
+
+ ScenePresence presence = scene.GetScenePresence(agent1);
+ ScenePresence presence2 = scene2.GetScenePresence(agent1);
+ presence2.AddAttachment(sog1);
+ presence2.AddAttachment(sog2);
+
+ ISharedRegionModule serialiser = new SerialiserModule();
+ SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), serialiser);
+ SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), serialiser);
+
+ Assert.That(presence.HasAttachments(), Is.False, "Presence has attachments before cross");
+
+ //Assert.That(presence2.CrossAttachmentsIntoNewRegion(region1, true), Is.True, "Cross was not successful");
+ Assert.That(presence2.HasAttachments(), Is.False, "Presence2 objects were not deleted");
+ Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects");
+ }
+
+ private SceneObjectGroup NewSOG(UUID uuid, Scene scene, UUID agent)
+ {
+ SceneObjectPart sop = new SceneObjectPart();
+ sop.Name = RandomName();
+ sop.Description = RandomName();
+ sop.Text = RandomName();
+ sop.SitName = RandomName();
+ sop.TouchName = RandomName();
+ sop.UUID = uuid;
+ sop.Shape = PrimitiveBaseShape.Default;
+ sop.Shape.State = 1;
+ sop.OwnerID = agent;
+
+ SceneObjectGroup sog = new SceneObjectGroup(sop);
+ sog.SetScene(scene);
+
+ return sog;
+ }
+
+ private static string RandomName()
+ {
+ StringBuilder name = new StringBuilder();
+ int size = random.Next(5,12);
+ char ch;
+ for (int i = 0; i < size; i++)
+ {
+ ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
+ name.Append(ch);
+ }
+
+ return name.ToString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 8286e4f..d82760e 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -331,56 +331,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
}
- [Test]
- public void T030_TestAddAttachments()
- {
- TestHelper.InMethod();
-
- ScenePresence presence = scene.GetScenePresence(agent1);
-
- presence.AddAttachment(sog1);
- presence.AddAttachment(sog2);
- presence.AddAttachment(sog3);
-
- Assert.That(presence.HasAttachments(), Is.True);
- Assert.That(presence.ValidateAttachments(), Is.True);
- }
-
- [Test]
- public void T031_RemoveAttachments()
- {
- TestHelper.InMethod();
-
- ScenePresence presence = scene.GetScenePresence(agent1);
- presence.RemoveAttachment(sog1);
- presence.RemoveAttachment(sog2);
- presence.RemoveAttachment(sog3);
- Assert.That(presence.HasAttachments(), Is.False);
- }
-
- // I'm commenting this test because scene setup NEEDS InventoryService to
- // be non-null
- //[Test]
- public void T032_CrossAttachments()
- {
- TestHelper.InMethod();
-
- ScenePresence presence = scene.GetScenePresence(agent1);
- ScenePresence presence2 = scene2.GetScenePresence(agent1);
- presence2.AddAttachment(sog1);
- presence2.AddAttachment(sog2);
-
- ISharedRegionModule serialiser = new SerialiserModule();
- SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), serialiser);
- SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), serialiser);
-
- Assert.That(presence.HasAttachments(), Is.False, "Presence has attachments before cross");
-
- //Assert.That(presence2.CrossAttachmentsIntoNewRegion(region1, true), Is.True, "Cross was not successful");
- Assert.That(presence2.HasAttachments(), Is.False, "Presence2 objects were not deleted");
- Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects");
- }
-
[TearDown]
public void TearDown()
{
--
cgit v1.1
From c155f57dbe6b36697d2e1e50d4de43f7af2b97d1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 22:22:51 +0000
Subject: remove unused test teardown method
---
OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
index 60e47f6..af44640 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/AttachmentTests.cs
@@ -49,7 +49,7 @@ using OpenSim.Tests.Common.Setup;
namespace OpenSim.Region.Framework.Scenes.Tests
{
///
- /// Scene presence tests
+ /// Attachment tests
///
[TestFixture]
public class AttachmentTests
@@ -86,13 +86,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
region2 = scene2.RegionInfo.RegionHandle;
SceneSetupHelpers.AddRootAgent(scene, agent1);
- }
-
- [TearDown]
- public void TearDown()
- {
- if (MainServer.Instance != null) MainServer.Instance.Stop();
- }
+ }
[Test]
public void T030_TestAddAttachments()
--
cgit v1.1
From 023f953f39709e90c8eb31bc332dc2c01346cbd9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 22:25:45 +0000
Subject: remove another unused test teardown method
---
OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 6 ------
1 file changed, 6 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index d82760e..ddff896 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -331,12 +331,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
}
- [TearDown]
- public void TearDown()
- {
- if (MainServer.Instance != null) MainServer.Instance.Stop();
- }
-
public static string GetRandomCapsObjectPath()
{
UUID caps = UUID.Random();
--
cgit v1.1
From eb699df5f6c7a68a500e38dc994ed7c2f2aa89d9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 22:49:19 +0000
Subject: On SceneSetupHelpers, go back to calling
ScenePresence.CompleteMovement() for the last stage of AddRootAgent() instead
of SP.MakeRootAgent()
Going this extra step doesn't appear to cause any test failures.
This is arguably better for test purposes, though at some stage another method may arise which does just call AddRootAgent().
---
.../Framework/Scenes/Tests/ScenePresenceTests.cs | 60 +++++++++++++++-------
1 file changed, 41 insertions(+), 19 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index ddff896..92c73be 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -172,25 +172,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(neighbours.Count, Is.EqualTo(2));
}
-
- public void fixNullPresence()
- {
- string firstName = "testfirstname";
-
- AgentCircuitData agent = new AgentCircuitData();
- agent.AgentID = agent1;
- agent.firstname = firstName;
- agent.lastname = "testlastname";
- agent.SessionID = UUID.Zero;
- agent.SecureSessionID = UUID.Zero;
- agent.circuitcode = 123;
- agent.BaseFolder = UUID.Zero;
- agent.InventoryFolder = UUID.Zero;
- agent.startpos = Vector3.Zero;
- agent.CapsPath = GetRandomCapsObjectPath();
-
- acd1 = agent;
- }
[Test]
public void T013_TestRemoveNeighbourRegion()
@@ -208,6 +189,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests
CompleteAvatarMovement
*/
}
+
+ ///
+ /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
+ ///
+ ///
+ /// Please note that unlike the other tests here, this doesn't rely on structures
+ ///
+ [Test]
+ public void TestChildAgentEstablished()
+ {
+ UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
+
+ TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
+ TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
+
+ SceneSetupHelpers.AddRootAgent(myScene1, agent1Id);
+ ScenePresence childPresence = myScene2.GetScenePresence(agent1);
+
+ // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
+// Assert.That(childPresence, Is.Not.Null);
+// Assert.That(childPresence.IsChildAgent, Is.True);
+ }
// I'm commenting this test, because this is not supposed to happen here
//[Test]
@@ -330,7 +333,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected.");
Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
}
+
+ public void fixNullPresence()
+ {
+ string firstName = "testfirstname";
+ AgentCircuitData agent = new AgentCircuitData();
+ agent.AgentID = agent1;
+ agent.firstname = firstName;
+ agent.lastname = "testlastname";
+ agent.SessionID = UUID.Zero;
+ agent.SecureSessionID = UUID.Zero;
+ agent.circuitcode = 123;
+ agent.BaseFolder = UUID.Zero;
+ agent.InventoryFolder = UUID.Zero;
+ agent.startpos = Vector3.Zero;
+ agent.CapsPath = GetRandomCapsObjectPath();
+
+ acd1 = agent;
+ }
+
public static string GetRandomCapsObjectPath()
{
UUID caps = UUID.Random();
--
cgit v1.1
From dd9efc183812a66b1654aaeb419945cf57650b08 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 23:05:56 +0000
Subject: extend TestChildAgentEstablished() test slightly to put in
EntityTransferModule. Not yet enabled.
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++-
OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 11 +++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b47ec3c..51b8dcc 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1161,7 +1161,9 @@ namespace OpenSim.Region.Framework.Scenes
if (m_agentTransfer != null)
m_agentTransfer.EnableChildAgents(this);
else
- m_log.DebugFormat("[SCENE PRESENCE]: Unable to create child agents in neighbours, because AgentTransferModule is not active");
+ m_log.DebugFormat(
+ "[SCENE PRESENCE]: Unable to create child agents in neighbours, because AgentTransferModule is not active for region {0}",
+ m_scene.RegionInfo.RegionName);
IFriendsModule friendsModule = m_scene.RequestModuleInterface();
if (friendsModule != null)
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 92c73be..60bc86c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -40,6 +40,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.CoreModules.Framework.EntityTransfer;
using OpenSim.Region.CoreModules.World.Serialiser;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
using OpenSim.Tests.Common;
@@ -199,10 +200,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestChildAgentEstablished()
{
+ TestHelper.InMethod();
+ log4net.Config.XmlConfigurator.Configure();
+
UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
- TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
- TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
+ TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
+ TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
+
+ EntityTransferModule etm = new EntityTransferModule();
+ SceneSetupHelpers.SetupSceneModules(myScene1, etm);
SceneSetupHelpers.AddRootAgent(myScene1, agent1Id);
ScenePresence childPresence = myScene2.GetScenePresence(agent1);
--
cgit v1.1
From 5c92f62941e21b6e5eec503ab95f149092e20217 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 23:10:46 +0000
Subject: minor: remove mono compiler warning
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 584c577..583214c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -845,7 +845,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void HandleUseCircuitCode(object o)
{
- DateTime startTime = DateTime.Now;
+// DateTime startTime = DateTime.Now;
object[] array = (object[])o;
UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1];
--
cgit v1.1
From 8249d77991352697b4972f7109c014db0ebd5f68 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 23:25:59 +0000
Subject: If GridService.GetNeighbours() could not find the region then log a
warning rather than causing a null reference on the normal log line
This also extends the TestChildAgentEstablished() test to actually activate the EntityTransferModule, though the test is not yet viable
---
OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 60bc86c..5e1ff79 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -201,15 +201,18 @@ namespace OpenSim.Region.Framework.Scenes.Tests
public void TestChildAgentEstablished()
{
TestHelper.InMethod();
- log4net.Config.XmlConfigurator.Configure();
+// log4net.Config.XmlConfigurator.Configure();
UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
+ IConfigSource configSource = new IniConfigSource();
+ configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule");
EntityTransferModule etm = new EntityTransferModule();
- SceneSetupHelpers.SetupSceneModules(myScene1, etm);
+
+ SceneSetupHelpers.SetupSceneModules(myScene1, configSource, etm);
SceneSetupHelpers.AddRootAgent(myScene1, agent1Id);
ScenePresence childPresence = myScene2.GetScenePresence(agent1);
--
cgit v1.1
From 60fe3d48ee83f004861044c51537256c0c389478 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Feb 2011 23:50:54 +0000
Subject: Put some CapabilitiesModule null checks in Scene
Stop tests setting up a capabilities module by default
---
OpenSim/Region/Framework/Scenes/Scene.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index e0af2d6..ee1e0be 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3010,7 +3010,9 @@ namespace OpenSim.Region.Framework.Scenes
(childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName);
m_sceneGraph.removeUserCount(!childagentYN);
- CapsModule.RemoveCapsHandler(agentID);
+
+ if (CapsModule != null)
+ CapsModule.RemoveCapsHandler(agentID);
// REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
// this method is doing is HORRIBLE!!!
@@ -3265,8 +3267,11 @@ namespace OpenSim.Region.Framework.Scenes
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
agent.AgentID, agent.circuitcode);
- CapsModule.NewUserConnection(agent);
- CapsModule.AddCapsHandler(agent.AgentID);
+ if (CapsModule != null)
+ {
+ CapsModule.NewUserConnection(agent);
+ CapsModule.AddCapsHandler(agent.AgentID);
+ }
}
else
{
@@ -3281,7 +3286,9 @@ namespace OpenSim.Region.Framework.Scenes
agent.AgentID, RegionInfo.RegionName);
sp.AdjustKnownSeeds();
- CapsModule.NewUserConnection(agent);
+
+ if (CapsModule != null)
+ CapsModule.NewUserConnection(agent);
}
}
--
cgit v1.1
From 9e47018cfb42cc67a1d414e73396861b3a6b99ea Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Feb 2011 00:14:13 +0000
Subject: Remove test T020_TestMakeRootAgent() which hasn't been active for
ages anyway
This test was non-viable. Keeping inactive T021_TestCrossToNewRegion() around for now since it's still useful for reference purposes in constructing a future working test.
---
.../Framework/Scenes/Tests/ScenePresenceTests.cs | 19 -------------------
1 file changed, 19 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 5e1ff79..fd2d6fa 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -222,25 +222,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// Assert.That(childPresence.IsChildAgent, Is.True);
}
- // I'm commenting this test, because this is not supposed to happen here
- //[Test]
- public void T020_TestMakeRootAgent()
- {
- TestHelper.InMethod();
-
- ScenePresence presence = scene.GetScenePresence(agent1);
- Assert.That(presence.IsChildAgent, Is.False, "Starts out as a root agent");
-
- presence.MakeChildAgent();
- Assert.That(presence.IsChildAgent, Is.True, "Did not change to child agent after MakeChildAgent");
-
- // Accepts 0 but rejects Constants.RegionSize
- Vector3 pos = new Vector3(0,unchecked(Constants.RegionSize-1),0);
- presence.MakeRootAgent(pos,true);
- Assert.That(presence.IsChildAgent, Is.False, "Did not go back to root agent");
- Assert.That(presence.AbsolutePosition, Is.EqualTo(pos), "Position is not the same one entered");
- }
-
// I'm commenting this test because it does not represent
// crossings. The Thread.Sleep's in here are not meaningful mocks,
// and they sometimes fail in panda.
--
cgit v1.1
From 5a78161e74116050b063ec679e1c134ad4a2f16e Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 19 Feb 2011 01:32:20 +0100
Subject: Restore heartbeat thread
---
OpenSim/Region/Framework/Scenes/Scene.cs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d4bfd46..2815f29 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1220,10 +1220,8 @@ namespace OpenSim.Region.Framework.Scenes
try
{
- Update();
-
- m_lastUpdate = Util.EnvironmentTickCount();
- m_firstHeartbeat = false;
+ while (!shuttingdown)
+ Update();
}
catch (ThreadAbortException)
{
@@ -1410,7 +1408,7 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the watchdog that this thread is still alive
Watchdog.UpdateThread();
- }
+ }
public void AddGroupTarget(SceneObjectGroup grp)
{
--
cgit v1.1
From 86decb2aa8727a0c2ff51dd5c9a12d122585df3c Mon Sep 17 00:00:00 2001
From: Mike Rieker
Date: Sun, 20 Feb 2011 15:57:57 +0000
Subject: throttle group notices to max of 4 threads at a time ...otherwise it
can create hundreds of threads and hang
---
.../Avatar/InstantMessage/MessageTransferModule.cs | 64 +++++++++++++++++-----
1 file changed, 50 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index dd9819a..a81ec7c 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -449,24 +449,37 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
return resp;
}
- ///
- /// delegate for sending a grid instant message asynchronously
- ///
- public delegate void GridInstantMessageDelegate(GridInstantMessage im, MessageResultNotification result, UUID prevRegionID);
+ private delegate void GridInstantMessageDelegate(GridInstantMessage im, MessageResultNotification result);
- protected virtual void GridInstantMessageCompleted(IAsyncResult iar)
- {
- GridInstantMessageDelegate icon =
- (GridInstantMessageDelegate)iar.AsyncState;
- icon.EndInvoke(iar);
- }
+ private class GIM {
+ public GridInstantMessage im;
+ public MessageResultNotification result;
+ };
+ private Queue pendingInstantMessages = new Queue();
+ private int numInstantMessageThreads = 0;
- protected virtual void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result)
+ private void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result)
{
- GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync;
+ lock (pendingInstantMessages) {
+ if (numInstantMessageThreads >= 4) {
+ GIM gim = new GIM();
+ gim.im = im;
+ gim.result = result;
+ pendingInstantMessages.Enqueue(gim);
+ } else {
+ ++ numInstantMessageThreads;
+ m_log.DebugFormat("[SendGridInstantMessageViaXMLRPC]: ++numInstantMessageThreads={0}", numInstantMessageThreads);
+ GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsyncMain;
+ d.BeginInvoke(im, result, GridInstantMessageCompleted, d);
+ }
+ }
+ }
- d.BeginInvoke(im, result, UUID.Zero, GridInstantMessageCompleted, d);
+ private void GridInstantMessageCompleted(IAsyncResult iar)
+ {
+ GridInstantMessageDelegate d = (GridInstantMessageDelegate)iar.AsyncState;
+ d.EndInvoke(iar);
}
///
@@ -481,8 +494,31 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
/// Pass in 0 the first time this method is called. It will be called recursively with the last
/// regionhandle tried
///
- protected virtual void SendGridInstantMessageViaXMLRPCAsync(GridInstantMessage im, MessageResultNotification result, UUID prevRegionID)
+ private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result)
{
+ GIM gim;
+ do {
+ try {
+ SendGridInstantMessageViaXMLRPCAsync(im, result, UUID.Zero);
+ } catch (Exception e) {
+ m_log.Error("[SendGridInstantMessageViaXMLRPC]: exception " + e.Message);
+ }
+ lock (pendingInstantMessages) {
+ if (pendingInstantMessages.Count > 0) {
+ gim = pendingInstantMessages.Dequeue();
+ im = gim.im;
+ result = gim.result;
+ } else {
+ gim = null;
+ -- numInstantMessageThreads;
+ m_log.DebugFormat("[SendGridInstantMessageViaXMLRPC]: --numInstantMessageThreads={0}", numInstantMessageThreads);
+ }
+ }
+ } while (gim != null);
+ }
+ private void SendGridInstantMessageViaXMLRPCAsync(GridInstantMessage im, MessageResultNotification result, UUID prevRegionID)
+ {
+
UUID toAgentID = new UUID(im.toAgentID);
PresenceInfo upd = null;
--
cgit v1.1
From 04dc43f591b8059ece94901ae32cf5485e8e9273 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 21 Feb 2011 04:02:16 +0100
Subject: Prevent attaching things you don't own from inworld. Simple solution
for a complex issue
---
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 8c92588..dc33dbb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -119,6 +119,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return;
}
+ if (part.OwnerID != remoteClient.AgentId) // Not ours
+ {
+ remoteClient.SendAgentAlertMessage(
+ "You don't have sufficient permissions to attach this object", false);
+ return;
+ }
+
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
// be removed when that functionality is implemented in opensim
AttachmentPt &= 0x7f;
--
cgit v1.1
From efd8d03c59296a4179331573016bb2e3fd5cfcc7 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 21 Feb 2011 04:02:47 +0100
Subject: Prevent giving copies of no copy scripts or transferring no trans
scripts through LSL
---
.../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index aa6e505..a62a7b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6867,6 +6867,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
// copy the first script found with this inventory name
+ TaskInventoryItem scriptItem = null;
m_host.TaskInventory.LockItemsForRead(true);
foreach (KeyValuePair inv in m_host.TaskInventory)
{
@@ -6877,6 +6878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
found = true;
srcId = inv.Key;
+ scriptItem = inv.Value;
break;
}
}
@@ -6889,8 +6891,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
- // the rest of the permission checks are done in RezScript, so check the pin there as well
- World.RezScript(srcId, m_host, destId, pin, running, start_param);
+ SceneObjectPart dest = World.GetSceneObjectPart(destId);
+ if (dest != null)
+ {
+ if ((scriptItem.BasePermissions & (uint)PermissionMask.Transfer) != 0 || dest.ParentGroup.RootPart.OwnerID == m_host.ParentGroup.RootPart.OwnerID)
+ {
+ // the rest of the permission checks are done in RezScript, so check the pin there as well
+ World.RezScript(srcId, m_host, destId, pin, running, start_param);
+
+ if ((scriptItem.BasePermissions & (uint)PermissionMask.Copy) == 0)
+ m_host.Inventory.RemoveInventoryItem(srcId);
+ }
+ }
// this will cause the delay even if the script pin or permissions were wrong - seems ok
ScriptSleep(3000);
}
--
cgit v1.1
From 1a31f7b579753bdcb5f52adc16a41eef4b14a25f Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 21 Feb 2011 04:14:49 +0100
Subject: Allow modifying a no mod object through llGiveInventoryItem if the
object sets allowed drop. This makes breedables feasible.
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9a93a26..9150257 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1227,6 +1227,10 @@ namespace OpenSim.Region.Framework.Scenes
if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0))
return;
+ bool overrideNoMod = false;
+ if ((part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0)
+ overrideNoMod = true;
+
if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
{
// object cannot copy items to an object owned by a different owner
@@ -1236,7 +1240,7 @@ namespace OpenSim.Region.Framework.Scenes
}
// must have both move and modify permission to put an item in an object
- if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
+ if (((part.OwnerMask & (uint)PermissionMask.Modify) == 0) && (!overrideNoMod))
{
return;
}
--
cgit v1.1
From 5a16fa882c0f1a6200bc3fdb63b0f4564acf0e6d Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Tue, 22 Feb 2011 13:23:54 -0800
Subject: Parameterizes the view distance used to compute and manage child
agents in neighbor regions. This means you can extend the view on a simulator
beyond the default 3x3 regions.
This uses a region default draw distance and should be
replaced at some point by the avatar specified draw distance.
That will require more careful, dynamic recomputation of child
agents every time the draw distance changes.
WARNING: this is experimental and has known instabilities. specifically
all regions "within site" should be running the same default draw distance
or agents will not be closed correctly.
---
.../EntityTransfer/EntityTransferModule.cs | 37 +++++++++++++++-------
.../EntityTransfer/HGEntityTransferModule.cs | 4 +--
OpenSim/Region/Framework/Scenes/Scene.cs | 9 ++++++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 +++++++++++---
4 files changed, 56 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 98aa563..95c771e 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentCircuit.Id0 = currentAgentCircuit.Id0;
}
- if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
+ if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
{
// brand new agent, let's create a new caps seed
agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
@@ -336,7 +336,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// OK, it got this agent. Let's close some child agents
sp.CloseChildAgents(newRegionX, newRegionY);
IClientIPEndpoint ipepClient;
- if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
+ if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
{
//sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent...");
#region IP Translation for NAT
@@ -447,7 +447,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
- if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
+ if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
{
Thread.Sleep(5000);
sp.Close();
@@ -521,14 +521,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return region;
}
- protected virtual bool NeedsNewAgent(uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY)
+ protected virtual bool NeedsNewAgent(float drawdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY)
{
- return Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY);
+ return Util.IsOutsideView(drawdist, oldRegionX, newRegionX, oldRegionY, newRegionY);
}
- protected virtual bool NeedsClosing(uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, GridRegion reg)
+ protected virtual bool NeedsClosing(float drawdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, GridRegion reg)
{
- return Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY);
+ return Util.IsOutsideView(drawdist, oldRegionX, newRegionX, oldRegionY, newRegionY);
}
protected virtual bool IsOutsideRegion(Scene s, Vector3 pos)
@@ -1045,7 +1045,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (m_regionInfo != null)
{
- neighbours = RequestNeighbours(sp.Scene, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
+ neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
}
else
{
@@ -1272,8 +1272,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
///
///
- protected List RequestNeighbours(Scene pScene, uint pRegionLocX, uint pRegionLocY)
+ protected List RequestNeighbours(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY)
{
+ Scene pScene = avatar.Scene;
RegionInfo m_regionInfo = pScene.RegionInfo;
Border[] northBorders = pScene.NorthBorders.ToArray();
@@ -1281,10 +1282,24 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Border[] eastBorders = pScene.EastBorders.ToArray();
Border[] westBorders = pScene.WestBorders.ToArray();
- // Legacy one region. Provided for simplicity while testing the all inclusive method in the else statement.
+ // Leaving this as a "megaregions" computation vs "non-megaregions" computation; it isn't
+ // clear what should be done with a "far view" given that megaregions already extended the
+ // view to include everything in the megaregion
if (northBorders.Length <= 1 && southBorders.Length <= 1 && eastBorders.Length <= 1 && westBorders.Length <= 1)
{
- return pScene.GridService.GetNeighbours(m_regionInfo.ScopeID, m_regionInfo.RegionID);
+ int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance;
+
+ int startX = (int)pRegionLocX * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2);
+ int startY = (int)pRegionLocY * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2);
+
+ int endX = (int)pRegionLocX * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2);
+ int endY = (int)pRegionLocY * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2);
+
+ List neighbours =
+ avatar.Scene.GridService.GetRegionRange(m_regionInfo.ScopeID, startX, endX, startY, endY);
+
+ neighbours.RemoveAll(delegate(GridRegion r) { return r.RegionID == m_regionInfo.RegionID; });
+ return neighbours;
}
else
{
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 35dcd95..79e76b4 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -130,9 +130,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return region;
}
- protected override bool NeedsClosing(uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, GridRegion reg)
+ protected override bool NeedsClosing(float drawdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, GridRegion reg)
{
- if (base.NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
+ if (base.NeedsClosing(drawdist, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
return true;
int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ee1e0be..7def7e9 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -83,6 +83,13 @@ namespace OpenSim.Region.Framework.Scenes
public bool m_useFlySlow;
public bool m_usePreJump;
public bool m_seeIntoRegionFromNeighbor;
+
+ protected float m_defaultDrawDistance = 255.0f;
+ public float DefaultDrawDistance
+ {
+ get { return m_defaultDrawDistance; }
+ }
+
// TODO: need to figure out how allow client agents but deny
// root agents when ACL denies access to root agent
public bool m_strictAccessControl = true;
@@ -627,6 +634,8 @@ namespace OpenSim.Region.Framework.Scenes
//
IConfig startupConfig = m_config.Configs["Startup"];
+ m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
+
//Animation states
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
// TODO: Change default to true once the feature is supported
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 51b8dcc..9e9481e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -626,7 +626,7 @@ namespace OpenSim.Region.Framework.Scenes
Utils.LongToUInts(handle, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
- if (Util.IsOutsideView(x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY))
+ if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY))
{
old.Add(handle);
}
@@ -700,6 +700,7 @@ namespace OpenSim.Region.Framework.Scenes
private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this()
{
+ m_DrawDistance = world.DefaultDrawDistance;
m_rootRegionHandle = reginfo.RegionHandle;
m_controllingClient = client;
m_firstname = m_controllingClient.FirstName;
@@ -1279,7 +1280,11 @@ namespace OpenSim.Region.Framework.Scenes
m_CameraUpAxis = agentData.CameraUpAxis;
// The Agent's Draw distance setting
- m_DrawDistance = agentData.Far;
+ // When we get to the point of re-computing neighbors everytime this
+ // changes, then start using the agent's drawdistance rather than the
+ // region's draw distance.
+ // m_DrawDistance = agentData.Far;
+ m_DrawDistance = Scene.DefaultDrawDistance;
// Check if Client has camera in 'follow cam' or 'build' mode.
Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation);
@@ -2913,7 +2918,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
//m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
- if (Util.IsOutsideView(x, newRegionX, y, newRegionY))
+ if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY))
{
byebyeRegions.Add(handle);
}
@@ -2989,7 +2994,12 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 offset = new Vector3(shiftx, shifty, 0f);
- m_DrawDistance = cAgentData.Far;
+ // When we get to the point of re-computing neighbors everytime this
+ // changes, then start using the agent's drawdistance rather than the
+ // region's draw distance.
+ // m_DrawDistance = cAgentData.Far;
+ m_DrawDistance = Scene.DefaultDrawDistance;
+
if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!!
m_pos = cAgentData.Position + offset;
@@ -3139,7 +3149,11 @@ namespace OpenSim.Region.Framework.Scenes
m_CameraLeftAxis = cAgent.LeftAxis;
m_CameraUpAxis = cAgent.UpAxis;
- m_DrawDistance = cAgent.Far;
+ // When we get to the point of re-computing neighbors everytime this
+ // changes, then start using the agent's drawdistance rather than the
+ // region's draw distance.
+ // m_DrawDistance = cAgent.Far;
+ m_DrawDistance = Scene.DefaultDrawDistance;
if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0)
ControllingClient.SetChildAgentThrottle(cAgent.Throttles);
--
cgit v1.1
From 1bb0bae78aa6654730e1095ba07086679de529de Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Tue, 22 Feb 2011 13:30:38 -0800
Subject: Forces the owner of a rezzed object to be the "rezzer" of the object
rather than the owner of the inventory item. In theory, this shouldn't happen
unless you are using grid-wide library for inventory.
---
.../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 7bb8789..bd316c6 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -524,6 +524,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (item != null)
{
+ item.Owner = remoteClient.AgentId;
+
AssetBase rezAsset = m_Scene.AssetService.Get(item.AssetID.ToString());
if (rezAsset != null)
--
cgit v1.1
From 2f5394e70ddefb5e7ec6a04022eef42a8ac89b0d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Feb 2011 22:33:54 +0000
Subject: Fix bug where avatars in other regions would not always show up on
the mini-map
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 969ff13..734ba22 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -204,9 +204,10 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
{
ScenePresence sp = presences[i];
+
// If this presence is a child agent, we don't want its coarse locations
if (sp.IsChildAgent)
- return;
+ continue;
if (sp.ParentID != 0)
{
--
cgit v1.1
From 197cc3883fe5c532588f6b721d5f9d1295c24abc Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Feb 2011 01:16:47 +0000
Subject: Fix bug where having no maximum memory cache timeout would cause the
flotsam asset cache to try using Double.MaxValue, which would cause the
underlying OpenMetaverse.ExpiringCache to choke.
There is probably an underlying bug to fix in ExpiringCache.
---
OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 6ed4867..edb6710 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache
}
else
{
- m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue);
+ m_MemoryCache.AddOrUpdate(key, asset, m_DefaultMemoryExpiration);
}
}
}
--
cgit v1.1
From beff0ac32f0575e7805fd0691ba3907b3d13b70c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Feb 2011 01:18:43 +0000
Subject: log actual cache directory for FlotsamAssetCache instead of always
logging the default
---
OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index edb6710..90fb9b3 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -147,7 +147,7 @@ namespace Flotsam.RegionModules.AssetCache
}
m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
- m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);
+ m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_CacheDirectory);
m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", false);
m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration));
--
cgit v1.1
From 939c47ac521dee943083d87abe70a7271ee78077 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Feb 2011 01:25:38 +0000
Subject: instead of using different default memory expiration depending on
whether there is a [FLOTSAM ASSET CACHE] section present at all, use the same
default all the time
this simplifies the code
---
OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 90fb9b3..02a4e4d 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -92,7 +92,7 @@ namespace Flotsam.RegionModules.AssetCache
// Expiration is expressed in hours.
private const double m_DefaultMemoryExpiration = 1.0;
private const double m_DefaultFileExpiration = 48;
- private TimeSpan m_MemoryExpiration = TimeSpan.Zero;
+ private TimeSpan m_MemoryExpiration = TimeSpan.FromHours(m_DefaultMemoryExpiration);
private TimeSpan m_FileExpiration = TimeSpan.Zero;
private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero;
@@ -245,16 +245,7 @@ namespace Flotsam.RegionModules.AssetCache
private void UpdateMemoryCache(string key, AssetBase asset)
{
if (m_MemoryCacheEnabled)
- {
- if (m_MemoryExpiration > TimeSpan.Zero)
- {
- m_MemoryCache.AddOrUpdate(key, asset, m_MemoryExpiration);
- }
- else
- {
- m_MemoryCache.AddOrUpdate(key, asset, m_DefaultMemoryExpiration);
- }
- }
+ m_MemoryCache.AddOrUpdate(key, asset, m_MemoryExpiration);
}
public void Cache(AssetBase asset)
--
cgit v1.1
From 0f545abfc17392c4a2113b07a945bd4cc7b8366f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Feb 2011 01:31:38 +0000
Subject: Make the file expiration defaults the same whether the whole [FLOTSAM
ASSET CACHE] section is missing or just the particular config values
---
OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 02a4e4d..9adb68b 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -93,8 +93,8 @@ namespace Flotsam.RegionModules.AssetCache
private const double m_DefaultMemoryExpiration = 1.0;
private const double m_DefaultFileExpiration = 48;
private TimeSpan m_MemoryExpiration = TimeSpan.FromHours(m_DefaultMemoryExpiration);
- private TimeSpan m_FileExpiration = TimeSpan.Zero;
- private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero;
+ private TimeSpan m_FileExpiration = TimeSpan.FromHours(m_DefaultFileExpiration);
+ private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.FromHours(m_DefaultFileExpiration);
private static int m_CacheDirectoryTiers = 1;
private static int m_CacheDirectoryTierLen = 3;
@@ -441,7 +441,7 @@ namespace Flotsam.RegionModules.AssetCache
private void CleanupExpiredFiles(object source, ElapsedEventArgs e)
{
if (m_LogLevel >= 2)
- m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration.ToString());
+ m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration);
// Purge all files last accessed prior to this point
DateTime purgeLine = DateTime.Now - m_FileExpiration;
--
cgit v1.1
From 2b04cab1ee4b7c89bdfbe93622f421f031879943 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Feb 2011 02:15:06 +0000
Subject: change some log messages from info to debug
---
OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +-
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index f8ce444..08ac624 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
}
}
- m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId);
+ m_log.DebugFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId);
// If we only found default textures, then the appearance is not cached
return (defonly ? false : true);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7def7e9..1a6a70b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3210,7 +3210,7 @@ namespace OpenSim.Region.Framework.Scenes
// TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
// Don't disable this log message - it's too helpful
- m_log.InfoFormat(
+ m_log.DebugFormat(
"[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})",
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
agent.AgentID, agent.circuitcode, teleportFlags);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9e9481e..00a1487 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2442,7 +2442,7 @@ namespace OpenSim.Region.Framework.Scenes
// If we are using the the cached appearance then send it out to everyone
if (cachedappearance)
{
- m_log.InfoFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name);
+ m_log.DebugFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name);
// If the avatars baked textures are all in the cache, then we have a
// complete appearance... send it out, if not, then we'll send it when
--
cgit v1.1
From 11105d38bdd8eb3eb3eb29eac7f054a2bdc22baf Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 27 Feb 2011 18:55:17 +0100
Subject: Fix a few little things
---
.../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 3 +++
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++
2 files changed, 5 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index fcf571d..108c9a0 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -149,6 +149,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = m_Scene.InventoryService.GetItem(item);
+ if (item.Owner != remoteClient.AgentId)
+ return UUID.Zero;
+
if (item != null)
{
if ((InventoryType)item.InvType == InventoryType.Notecard)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9150257..bc892e0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -303,6 +303,8 @@ namespace OpenSim.Region.Framework.Scenes
// Passing something to another avatar or a an object will already
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = InventoryService.GetItem(item);
+ if (item.Owner != remoteClient.AgentId)
+ return;
if (item != null)
{
--
cgit v1.1
From cea47491de6723230a49b1ac99cecc5c32758f40 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 27 Feb 2011 18:55:17 +0100
Subject: Fix a few little things
---
.../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 3 +++
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++
2 files changed, 5 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index bd316c6..798547a 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -148,6 +148,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = m_Scene.InventoryService.GetItem(item);
+ if (item.Owner != remoteClient.AgentId)
+ return UUID.Zero;
+
if (item != null)
{
if ((InventoryType)item.InvType == InventoryType.Notecard)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index e2d96d9..fcbcf59 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -321,6 +321,8 @@ namespace OpenSim.Region.Framework.Scenes
// Passing something to another avatar or a an object will already
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = InventoryService.GetItem(item);
+ if (item.Owner != remoteClient.AgentId)
+ return;
if (item != null)
{
--
cgit v1.1
From 0719ffa6fab128352868b65a4ec48e40357ecc5f Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 1 Mar 2011 23:34:02 +0100
Subject: Change protection from being teleported home to extend to incognito
gods.
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a62a7b4..559523b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4486,7 +4486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (presence != null)
{
// agent must not be a god
- if (presence.GodLevel >= 200) return;
+ if (presence.UserLevel >= 200) return;
// agent must be over the owners land
if (m_host.OwnerID == World.LandChannel.GetLandObject(
--
cgit v1.1
From 3c89527b222c2ddc50553ce1c49f22e9f05db11b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 00:06:51 +0000
Subject: Fix bug where llSetPrimMediaParams() reported success but never set
the media texture.
We weren't setting the TextureEntryFace.MediaFlags = true when a media texture was set directly via a script. This was being done when the viewer was setting them directly.
---
.../Region/CoreModules/World/Media/Moap/MoapModule.cs | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 7c5d044..9132753 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -227,15 +227,24 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{
+// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
+
CheckFaceParam(part, face);
if (null == part.Shape.Media)
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
-
+
lock (part.Shape.Media)
- part.Shape.Media[face] = me;
+ part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero);
+
+ // Temporary code to fix llSetPrimMediaParams() bug, pending refactoring
+ Primitive.TextureEntry te = part.Shape.Textures;
+ Primitive.TextureEntryFace teFace = te.CreateFace((uint)face);
+ teFace.MediaFlags = true;
+ part.Shape.Textures = te;
+
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
@@ -333,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
-
+//
// for (int i = 0; i < omu.FaceMedia.Length; i++)
// {
// MediaEntry me = omu.FaceMedia[i];
@@ -380,6 +389,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
else
{
+// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name);
+
// We need to go through the media textures one at a time to make sure that we have permission
// to change them
--
cgit v1.1
From 481ca910da47e68546623573ac9bba669d7b44c1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:07:05 +0000
Subject: add test for MoapModule.SetMediaUrl()
---
.../World/Media/Moap/Tests/MoapTests.cs | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
new file mode 100644
index 0000000..d4c9245
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Threading;
+using log4net.Config;
+using NUnit.Framework;
+using NUnit.Framework.SyntaxHelpers;
+using OpenMetaverse;
+using OpenMetaverse.Assets;
+using OpenSim.Framework;
+using OpenSim.Region.CoreModules.Media.Moap;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Serialization;
+using OpenSim.Tests.Common;
+using OpenSim.Tests.Common.Mock;
+using OpenSim.Tests.Common.Setup;
+
+namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
+{
+ [TestFixture]
+ public class MoapTests
+ {
+ [Test]
+ public void TestSetMediaUrl()
+ {
+ TestHelper.InMethod();
+
+ string homeUrl = "opensimulator.org";
+
+ MoapModule module = new MoapModule();
+ TestScene scene = SceneSetupHelpers.SetupScene();
+ SceneSetupHelpers.SetupSceneModules(scene, module);
+
+ SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
+ MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
+
+ module.SetMediaEntry(part, 1, me);
+
+ Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl));
+ Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero));
+ Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True);
+ }
+ }
+}
\ No newline at end of file
--
cgit v1.1
From 72cb498fd0c167867d71c26e55afedc2e23ab9b4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:13:59 +0000
Subject: minor: Make MoapModule namespace consistent with other modules
---
OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 2 +-
OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 9132753..b6ec6dc 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -50,7 +50,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
-namespace OpenSim.Region.CoreModules.Media.Moap
+namespace OpenSim.Region.CoreModules.World.Media.Moap
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
public class MoapModule : INonSharedRegionModule, IMoapModule
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
index d4c9245..9e5c7ae 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -36,7 +36,7 @@ using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenMetaverse.Assets;
using OpenSim.Framework;
-using OpenSim.Region.CoreModules.Media.Moap;
+using OpenSim.Region.CoreModules.World.Media.Moap;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Tests.Common;
--
cgit v1.1
From 8efb01b3df1ea98d5e4a68aa220bafc4ab5306f4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:15:27 +0000
Subject: minor: remove some mono compiler warnings
---
.../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +-
.../Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 12 ++++++------
.../XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index dfeecb1..6a24cc1 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")]
public class LindenUDPInfoModule : ISharedRegionModule
{
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary m_scenes = new Dictionary();
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index e9c5453..05a1c3b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
private static string m_freeSwitchUrlResetPassword;
private uint m_freeSwitchServicePort;
private string m_openSimWellKnownHTTPAddress;
- private string m_freeSwitchContext;
+// private string m_freeSwitchContext;
private readonly Dictionary m_UUIDName = new Dictionary();
private Dictionary m_ParcelAddress = new Dictionary();
@@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
m_freeSwitchDefaultWellKnownIP = map["DefaultWellKnownIP"].AsString();
m_freeSwitchDefaultTimeout = map["DefaultTimeout"].AsInteger();
m_freeSwitchUrlResetPassword = String.Empty;
- m_freeSwitchContext = map["Context"].AsString();
+// m_freeSwitchContext = map["Context"].AsString();
if (String.IsNullOrEmpty(m_freeSwitchRealm) ||
String.IsNullOrEmpty(m_freeSwitchAPIPrefix))
@@ -662,7 +662,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
resp.Append("