From a58f5b2f6679bfb8565741afaead7e6d8dc8c299 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Nov 2011 22:08:34 +0000
Subject: When setting packet level logging via "debug packet", apply to all
clients, not just root ones.
Also adds scene name and client type (root|child) to logged information.
---
OpenSim/Region/Framework/Scenes/SceneManager.cs | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index eeb087f..82458e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -448,29 +448,25 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Set the debug packet level on the current scene. This level governs which packets are printed out to the
+ /// Set the debug packet level on each current scene. This level governs which packets are printed out to the
/// console.
///
///
/// Name of avatar to debug
public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
{
- ForEachCurrentScene(
- delegate(Scene scene)
+ ForEachCurrentScene(scene =>
+ scene.ForEachScenePresence(sp =>
{
- scene.ForEachRootClient(delegate(IClientAPI client)
+ if (name == null || sp.Name == name)
{
- if (name == null || client.Name == name)
- {
- m_log.DebugFormat("Packet debug for {0} {1} set to {2}",
- client.FirstName,
- client.LastName,
- newDebug);
+ m_log.DebugFormat(
+ "Packet debug for {0} ({1}) set to {2}",
+ sp.Name, sp.IsChildAgent ? "child" : "root", newDebug);
- client.DebugPacketLevel = newDebug;
- }
- });
- }
+ sp.ControllingClient.DebugPacketLevel = newDebug;
+ }
+ })
);
}
--
cgit v1.1
From 8e32ce85a7a33730ca6656637d6a720d538c1dfa Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Nov 2011 22:45:29 +0000
Subject: Remove bizarre call to PhysicsScene.Simulate(0) in
Scene.GetNearestAllowedPosition()
At least on ODE, this wasn't doing any harm but there wasn't any point to it either
---
OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 47450ed..9a71cd4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4633,9 +4633,6 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3? GetNearestAllowedPosition(ScenePresence avatar)
{
- //simulate to make sure we have pretty up to date positions
- PhysicsScene.Simulate(0);
-
ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (nearestParcel != null)
@@ -4662,12 +4659,13 @@ namespace OpenSim.Region.Framework.Scenes
//Ultimate backup if we have no idea where they are
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
return avatar.lastKnownAllowedPosition;
-
}
//Go to the edge, this happens in teleporting to a region with no available parcels
Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
+
//Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
+
return nearestRegionEdgePoint;
}
--
cgit v1.1
From 0688861aa72dc162a3da7b60804ac17ff5908067 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 25 Nov 2011 22:15:29 +0000
Subject: Use the more extensive
Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the
arrays in TaskInventoryItem
---
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d80944b..daddb90 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes
invString.AddSectionEnd();
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
- invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
- invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
+ invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
+ invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
invString.AddSaleStart();
--
cgit v1.1
From bafea2282a95017099578a0a31a908e746161414 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 26 Nov 2011 01:39:23 +0000
Subject: Rip out unused Scene.HandleFetchInventoryDescendentsCAPS().
This has been handled by WebFetchInvDescHandler.Fetch() for some time.
---
.../Framework/Scenes/Scene.PacketHandlers.cs | 58 ----------------------
1 file changed, 58 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 270e582..2ac6387 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -511,64 +511,6 @@ namespace OpenSim.Region.Framework.Scenes
SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
d.EndInvoke(iar);
}
-
- ///
- /// Handle the caps inventory descendents fetch.
- ///
- /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
- /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime??
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// null if the inventory look up failed
- public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
- bool fetchFolders, bool fetchItems, int sortOrder, out int version)
- {
- m_log.DebugFormat(
- "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
- fetchFolders, fetchItems, folderID, agentID);
-
- // FIXME MAYBE: We're not handling sortOrder!
-
- // TODO: This code for looking in the folder for the library should be folded back into the
- // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
- // can be handled transparently).
- InventoryFolderImpl fold;
- if (LibraryService != null && LibraryService.LibraryRootFolder != null)
- if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
- {
- version = 0;
- InventoryCollection ret = new InventoryCollection();
- ret.Folders = new List();
- ret.Items = fold.RequestListOfItems();
-
- return ret;
- }
-
- InventoryCollection contents = new InventoryCollection();
-
- if (folderID != UUID.Zero)
- {
- contents = InventoryService.GetFolderContent(agentID, folderID);
- InventoryFolderBase containingFolder = new InventoryFolderBase();
- containingFolder.ID = folderID;
- containingFolder.Owner = agentID;
- containingFolder = InventoryService.GetFolder(containingFolder);
- version = containingFolder.Version;
- }
- else
- {
- // Lost itemsm don't really need a version
- version = 1;
- }
-
- return contents;
-
- }
///
/// Handle an inventory folder creation request from the client.
--
cgit v1.1
From 86cc00aaa8dba93ea614460ceab7d6ba5e1adec5 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 26 Nov 2011 01:52:12 +0000
Subject: minor: formatting changes in Scene.PacketHandlers.cs
---
OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 2ac6387..6ba74c7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
- }
+ }
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List surfaceArgs)
{
@@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes
// can be handled transparently).
InventoryFolderImpl fold = null;
if (LibraryService != null && LibraryService.LibraryRootFolder != null)
+ {
if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
{
remoteClient.SendInventoryFolderDetails(
@@ -491,6 +492,7 @@ namespace OpenSim.Region.Framework.Scenes
fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems);
return;
}
+ }
// We're going to send the reply async, because there may be
// an enormous quantity of packets -- basically the entire inventory!
@@ -585,14 +587,13 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ delegate void PurgeFolderDelegate(UUID userID, UUID folder);
+
///
/// This should delete all the items and folders in the given directory.
///
///
///
-
- delegate void PurgeFolderDelegate(UUID userID, UUID folder);
-
public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
{
PurgeFolderDelegate d = PurgeFolderAsync;
@@ -606,7 +607,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
-
private void PurgeFolderAsync(UUID userID, UUID folderID)
{
InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);
--
cgit v1.1