From 69c8cc787f0bcecd617aeeff3d2776ba159d82ee Mon Sep 17 00:00:00 2001 From: BlueWall Date: Thu, 13 Jan 2011 11:39:50 -0500 Subject: Make FireAndForgetWrapper a singleton class Made FireAndForgetWrapper a singleton class to allow us to drop dependancy on the BclExtras35 library. BclExtras is broken in Mono 2.8.2 and we used the library in only one function. --- OpenSim/Framework/Util.cs | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 8d1671a..d1d8736 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -46,7 +46,7 @@ using System.Threading; using log4net; using Nini.Config; using Nwc.XmlRpc; -using BclExtras; +// using BclExtras; using OpenMetaverse; using OpenMetaverse.StructuredData; using Amib.Threading; @@ -1375,8 +1375,29 @@ namespace OpenSim.Framework /// /// Created to work around a limitation in Mono with nested delegates /// - private class FireAndForgetWrapper + private sealed class FireAndForgetWrapper { + private static volatile FireAndForgetWrapper instance; + private static object syncRoot = new Object(); + + public static FireAndForgetWrapper Instance { + get { + + if (instance == null) + { + lock (syncRoot) + { + if (instance == null) + { + instance = new FireAndForgetWrapper(); + } + } + } + + return instance; + } + } + public void FireAndForget(System.Threading.WaitCallback callback) { callback.BeginInvoke(null, EndFireAndForget, callback); @@ -1445,7 +1466,7 @@ namespace OpenSim.Framework ThreadPool.QueueUserWorkItem(callback, obj); break; case FireAndForgetMethod.BeginInvoke: - FireAndForgetWrapper wrapper = Singleton.GetInstance(); + FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance; wrapper.FireAndForget(callback, obj); break; case FireAndForgetMethod.SmartThreadPool: -- cgit v1.1 From 30320077a292ba98f054794f9f817628bf2be0f9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Jan 2011 01:01:02 +0100 Subject: Fix slam bits being lost when editing perms in prim inventory --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 91bb3a5..004e20c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -695,7 +695,6 @@ namespace OpenSim.Region.Framework.Scenes { item.ParentID = m_part.UUID; item.ParentPartID = m_part.UUID; - item.Flags = m_items[item.ItemID].Flags; // If group permissions have been set on, check that the groupID is up to date in case it has // changed since permissions were last set. -- cgit v1.1 From 66f99ae2677c4cfc26d2376c1de9e8e5d7022dfd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 11:03:46 -0800 Subject: More debug messages to help track the XFF header problem. --- OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | 2 ++ OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 3 +++ 2 files changed, 5 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index 0066bd4..814a8d9 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs @@ -223,6 +223,8 @@ namespace OpenSim.Server.Handlers.Hypergrid if (ep != null) return ep.Address.ToString(); } + else + m_log.WarnFormat("[HOME AGENT HANDLER]: No XFF header"); // Oops return Util.GetCallerIP(request); diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 9c41bcb..b572cb3 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -208,6 +208,9 @@ namespace OpenSim.Server.Handlers.Simulation if (ep != null) return ep.Address.ToString(); } + else + m_log.WarnFormat("[AGENT HANDLER]: No XFF header"); + // Oops return Util.GetCallerIP(request); -- cgit v1.1 From 0aeb8981b2b147e2caf2614fbfe59bd7e4340aee Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 11:19:20 -0800 Subject: Brute force debug for XFF issue --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index b572cb3..96821ec 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -200,6 +200,13 @@ namespace OpenSim.Server.Handlers.Simulation // We're behind a proxy Hashtable headers = (Hashtable)request["headers"]; + + foreach (object o in headers.Keys) + { + if (o != null) + m_log.DebugFormat("[XXX] {0}", o.ToString()); + } + if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) { m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); -- cgit v1.1 From 479d72ac975fd34f43d76c0ab20f869cb07fb6fc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 11:37:39 -0800 Subject: Account for some component along the way lower-casing the HTTP header keys. (XFF header issue) --- .../Server/Handlers/Hypergrid/HomeAgentHandlers.cs | 21 ++++++++++++-------- .../Server/Handlers/Simulation/AgentHandlers.cs | 23 ++++++++++------------ 2 files changed, 23 insertions(+), 21 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index 814a8d9..968c1e6 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs @@ -215,16 +215,21 @@ namespace OpenSim.Server.Handlers.Hypergrid // We're behind a proxy Hashtable headers = (Hashtable)request["headers"]; - if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) - { - m_log.DebugFormat("[HOME AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); + string xff = "X-Forwarded-For"; + if (headers.ContainsKey(xff.ToLower())) + xff = xff.ToLower(); - IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); - if (ep != null) - return ep.Address.ToString(); + if (!headers.ContainsKey(xff) || headers[xff] == null) + { + m_log.WarnFormat("[AGENT HANDLER]: No XFF header"); + return Util.GetCallerIP(request); } - else - m_log.WarnFormat("[HOME AGENT HANDLER]: No XFF header"); + + m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]); + + IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]); + if (ep != null) + return ep.Address.ToString(); // Oops return Util.GetCallerIP(request); diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 96821ec..57672a8 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -200,24 +200,21 @@ namespace OpenSim.Server.Handlers.Simulation // We're behind a proxy Hashtable headers = (Hashtable)request["headers"]; + string xff = "X-Forwarded-For"; + if (headers.ContainsKey(xff.ToLower())) + xff = xff.ToLower(); - foreach (object o in headers.Keys) + if (!headers.ContainsKey(xff) || headers[xff] == null) { - if (o != null) - m_log.DebugFormat("[XXX] {0}", o.ToString()); + m_log.WarnFormat("[AGENT HANDLER]: No XFF header"); + return Util.GetCallerIP(request); } - if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) - { - m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); - - IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); - if (ep != null) - return ep.Address.ToString(); - } - else - m_log.WarnFormat("[AGENT HANDLER]: No XFF header"); + m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]); + IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]); + if (ep != null) + return ep.Address.ToString(); // Oops return Util.GetCallerIP(request); -- cgit v1.1 From 5e35651efc98fd140a454c2dd6c5e826573f9dd6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 11:45:13 -0800 Subject: Protect World Map module, RequestMapItemsAsync, from badly formed URLs. --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f9d28b9..e0f36a2 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -641,7 +641,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap lock (m_openRequests) m_openRequests.Add(requestID, mrs); - WebRequest mapitemsrequest = WebRequest.Create(httpserver); + WebRequest mapitemsrequest = null; + try + { + mapitemsrequest = WebRequest.Create(httpserver); + } + catch (Exception e) + { + m_log.DebugFormat("[WORLD MAP]: Access to {0} failed with {1}", httpserver, e); + return new OSDMap(); + } + mapitemsrequest.Method = "POST"; mapitemsrequest.ContentType = "application/xml+llsd"; OSDMap RAMap = new OSDMap(); -- cgit v1.1 From 59c2cd04ba056b85eb4873e472b95826a1cc13b5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 12:35:19 -0800 Subject: DEBUG DEBUG DEBUG --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++ OpenSim/Services/HypergridService/UserAgentService.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..8e4aaf1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -839,6 +839,7 @@ namespace OpenSim.Region.Framework.Scenes m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); + m_log.DebugFormat("[XXX] MakeRoot 1"); // Moved this from SendInitialData to ensure that m_appearance is initialized // before the inventory is processed in MakeRootAgent. This fixes a race condition @@ -899,6 +900,7 @@ namespace OpenSim.Region.Framework.Scenes } AddToPhysicalScene(isFlying); + m_log.DebugFormat("[XXX] MakeRoot 2"); if (m_appearance != null) { @@ -941,7 +943,9 @@ namespace OpenSim.Region.Framework.Scenes presence.Animator.SendAnimPackToClient(ControllingClient); }); + m_log.DebugFormat("[XXX] MakeRoot 3"); m_scene.EventManager.TriggerOnMakeRootAgent(this); + m_log.DebugFormat("[XXX] MakeRoot 4"); } /// diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 3ead180..d5842fb 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -269,7 +269,7 @@ namespace OpenSim.Services.HypergridService bool result = m_TravelingAgents[sessionID].ClientIPAddress == reportedIP || m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed - m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {1}; result is {3}", + m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {2}; result is {3}", reportedIP, m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress, result); return result; -- cgit v1.1 From 4bcee1dfb4337fca342fd29916d5da3b4c7db954 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 13:07:02 -0800 Subject: Revert "DEBUG DEBUG DEBUG" This reverts commit 59c2cd04ba056b85eb4873e472b95826a1cc13b5. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ---- OpenSim/Services/HypergridService/UserAgentService.cs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8e4aaf1..3a40196 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -839,7 +839,6 @@ namespace OpenSim.Region.Framework.Scenes m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); - m_log.DebugFormat("[XXX] MakeRoot 1"); // Moved this from SendInitialData to ensure that m_appearance is initialized // before the inventory is processed in MakeRootAgent. This fixes a race condition @@ -900,7 +899,6 @@ namespace OpenSim.Region.Framework.Scenes } AddToPhysicalScene(isFlying); - m_log.DebugFormat("[XXX] MakeRoot 2"); if (m_appearance != null) { @@ -943,9 +941,7 @@ namespace OpenSim.Region.Framework.Scenes presence.Animator.SendAnimPackToClient(ControllingClient); }); - m_log.DebugFormat("[XXX] MakeRoot 3"); m_scene.EventManager.TriggerOnMakeRootAgent(this); - m_log.DebugFormat("[XXX] MakeRoot 4"); } /// diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index d5842fb..3ead180 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -269,7 +269,7 @@ namespace OpenSim.Services.HypergridService bool result = m_TravelingAgents[sessionID].ClientIPAddress == reportedIP || m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed - m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {2}; result is {3}", + m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {1}; result is {3}", reportedIP, m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress, result); return result; -- cgit v1.1 From aecaadd3bdb8013addde47731e12427e2acc8994 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 17 Jan 2011 13:10:09 -0800 Subject: objectId in AvatarAnimation packet should be UUID.Zero for non-overridden animations --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ee4f04e..c765e68 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3466,8 +3466,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock(); ani.AnimationSourceList[i].ObjectID = objectIDs[i]; - if (objectIDs[i] == UUID.Zero) - ani.AnimationSourceList[i].ObjectID = sourceAgentId; } ani.Header.Reliable = false; OutPacket(ani, ThrottleOutPacketType.Task); -- cgit v1.1 From 81552099d6eaf1142cde4bbe864dfa1e752af5e5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Jan 2011 23:45:25 +0000 Subject: Fix UnackedBytes client stack statistic as seen in "show queues" Bytes were being wrongly added again on a resend --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 -- OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index e54cfc2..fe5156e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -585,8 +585,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Stats tracking Interlocked.Increment(ref udpClient.PacketsSent); - if (isReliable) - Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); // Put the UDP payload on the wire AsyncBeginSend(buffer); diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 4cb4aee..d762bef 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Threading; using OpenMetaverse; namespace OpenSim.Region.ClientStack.LindenUDP @@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void Add(OutgoingPacket packet) { m_pendingAdds.Enqueue(packet); + Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); } /// @@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_packets.Remove(pendingRemove.SequenceNumber); // Update stats - System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); + Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); if (!pendingRemove.FromResend) { -- cgit v1.1 From 6e58996b4d9db202cd7795a37bd687362effef48 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Jan 2011 23:57:50 +0000 Subject: refactor: remove redundant null checks --- .../LindenUDP/UnackedPacketCollection.cs | 45 ++++++++-------------- 1 file changed, 15 insertions(+), 30 deletions(-) (limited to 'OpenSim') 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 8233ef25ba53357bec02a9e3ad4759ef8d01ea1b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:10:34 +0000 Subject: Reduce amount of debug lopgging put out by some simiangrid connectors. Please re-enable if needed. --- .../SimianGrid/SimianGridServiceConnector.cs | 2 +- .../SimianGrid/SimianInventoryServiceConnector.cs | 4 ++-- .../SimianGrid/SimianPresenceServiceConnector.cs | 27 +++++++++++----------- .../SimianUserAccountServiceConnector.cs | 8 +++---- 4 files changed, 20 insertions(+), 21 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 18a31670..b62459e 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -175,7 +175,7 @@ namespace OpenSim.Services.Connectors.SimianGrid } } - m_log.Debug("[SIMIAN GRID CONNECTOR]: Found " + regions.Count + " neighbors for region " + regionID); +// m_log.Debug("[SIMIAN GRID CONNECTOR]: Found " + regions.Count + " neighbors for region " + regionID); return regions; } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 61f3fbe..39df1f5 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -757,7 +757,7 @@ namespace OpenSim.Services.Connectors.SimianGrid } } - m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invFolders.Count + " folders from SimianGrid response"); +// m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invFolders.Count + " folders from SimianGrid response"); return invFolders; } @@ -824,7 +824,7 @@ namespace OpenSim.Services.Connectors.SimianGrid } } - m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invItems.Count + " items from SimianGrid response"); +// m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invItems.Count + " items from SimianGrid response"); return invItems; } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 8141420..678f738 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -158,7 +158,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool LogoutAgent(UUID sessionID) { - m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for agent with sessionID " + sessionID); +// m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for agent with sessionID " + sessionID); NameValueCollection requestArgs = new NameValueCollection { @@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool LogoutRegionAgents(UUID regionID) { - m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for all agents in region " + regionID); +// m_log.InfoFormat("[SIMIAN PRESENCE CONNECTOR]: Logout requested for all agents in region " + regionID); NameValueCollection requestArgs = new NameValueCollection { @@ -202,7 +202,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public PresenceInfo GetAgent(UUID sessionID) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent with sessionID " + sessionID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent with sessionID " + sessionID); NameValueCollection requestArgs = new NameValueCollection { @@ -262,7 +262,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Logging out user " + userID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Logging out user " + userID); // Remove the session to mark this user offline if (!LogoutAgent(sessionID)) @@ -287,7 +287,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool SetHome(string userID, UUID regionID, Vector3 position, Vector3 lookAt) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Setting home location for user " + userID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Setting home location for user " + userID); NameValueCollection requestArgs = new NameValueCollection { @@ -312,10 +312,10 @@ namespace OpenSim.Services.Connectors.SimianGrid public GridUserInfo GetGridUserInfo(string user) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); UUID userID = new UUID(user); - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID); NameValueCollection requestArgs = new NameValueCollection { @@ -338,7 +338,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private OSDMap GetUserData(UUID userID) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting user data for " + userID); NameValueCollection requestArgs = new NameValueCollection { @@ -362,7 +362,7 @@ namespace OpenSim.Services.Connectors.SimianGrid OSDMap userResponse = GetUserData(userID); if (userResponse != null) { - m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting sessions for " + userID); +// m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting sessions for " + userID); NameValueCollection requestArgs = new NameValueCollection { @@ -377,10 +377,10 @@ namespace OpenSim.Services.Connectors.SimianGrid if (presence != null) presences.Add(presence); } - else - { - m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString()); - } +// else +// { +// m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString()); +// } } return presences; @@ -424,7 +424,6 @@ namespace OpenSim.Services.Connectors.SimianGrid { if (userResponse != null && userResponse["User"] is OSDMap) { - GridUserInfo info = new GridUserInfo(); info.Online = true; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 9c150ee..91e2976 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -157,7 +157,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { List accounts = new List(); - m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Searching for user accounts with name query " + query); +// m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Searching for user accounts with name query " + query); NameValueCollection requestArgs = new NameValueCollection { @@ -193,7 +193,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool StoreUserAccount(UserAccount data) { - m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account for " + data.Name); +// m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account for " + data.Name); NameValueCollection requestArgs = new NameValueCollection { @@ -250,7 +250,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private UserAccount GetUser(NameValueCollection requestArgs) { string lookupValue = (requestArgs.Count > 1) ? requestArgs[1] : "(Unknown)"; - m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Looking up user account with query: " + lookupValue); +// m_log.DebugFormat("[SIMIAN ACCOUNT CONNECTOR]: Looking up user account with query: " + lookupValue); OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); if (response["Success"].AsBoolean()) @@ -325,4 +325,4 @@ namespace OpenSim.Services.Connectors.SimianGrid } } } -} +} \ No newline at end of file -- cgit v1.1 From 523628dca30ea46c4da103f06e71931c36b7c063 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:14:58 +0000 Subject: minor: remove mono compiler warnings --- .../Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | 4 ++-- OpenSim/Services/Connectors/Simulation/EstateDataService.cs | 6 +++--- OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | 6 +++--- .../Services/Connectors/Simulation/SimulationServiceConnector.cs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index b62459e..918544f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -56,7 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid MethodBase.GetCurrentMethod().DeclaringType); private string m_ServerURI = String.Empty; - private bool m_Enabled = false; +// private bool m_Enabled = false; public SimianGridServiceConnector() { } public SimianGridServiceConnector(string serverURI) @@ -93,7 +93,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) serviceUrl = serviceUrl + '/'; m_ServerURI = serviceUrl; - m_Enabled = true; +// m_Enabled = true; } #region IGridService diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs index 8a8b46d..b6df5a2 100644 --- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs @@ -43,9 +43,9 @@ namespace OpenSim.Services.Connectors { public class EstateDataService : ServiceBase, IEstateDataService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); protected IEstateDataStore m_database; diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index 0df9380..ccef50b 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs @@ -43,9 +43,9 @@ namespace OpenSim.Services.Connectors { public class SimulationDataService : ServiceBase, ISimulationDataService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); protected ISimulationDataStore m_database; diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index f34c2bd..143c296 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -237,7 +237,7 @@ namespace OpenSim.Services.Connectors.Simulation try { - OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"DELETE",10000); + WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000); } catch (Exception e) { @@ -257,7 +257,7 @@ namespace OpenSim.Services.Connectors.Simulation try { - OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"DELETE",10000); + WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000); } catch (Exception e) { @@ -303,7 +303,7 @@ namespace OpenSim.Services.Connectors.Simulation args["destination_name"] = OSD.FromString(destination.RegionName); args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); - OSDMap result = WebUtil.PostToService(uri,args); + WebUtil.PostToService(uri, args); } catch (Exception e) { -- cgit v1.1 From c544f0d0c5fcea625107c0eff25be8aa0586564a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:25:24 +0000 Subject: Prune some of the excess logging for client logins. Didn't touch the appearance related stuff. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 +++--- OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 4 ++-- OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++--- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 2 +- OpenSim/Services/LLLoginService/LLLoginService.cs | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index fe5156e..571624b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -857,9 +857,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Acknowledge the UseCircuitCode packet SendAckImmediate(remoteEndPoint, packet.Header.Sequence); - m_log.DebugFormat( - "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", - buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); +// m_log.DebugFormat( +// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", +// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs index 36aaab3..8347e35 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs @@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets { UUID capID = UUID.Random(); - m_log.Info("[GETMESH]: /CAPS/" + capID); +// m_log.Info("[GETMESH]: /CAPS/" + capID); caps.RegisterHandler("GetMesh", new RestHTTPHandler("GET", "/CAPS/" + capID, delegate(Hashtable m_dhttpMethod) diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs index 1f60e36..6fb8b46 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps { UUID capID = UUID.Random(); - m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); +// m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); } @@ -171,7 +171,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps /// False for "caller try another codec"; true otherwise private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format) { - m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); +// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); AssetBase texture; string fullID = textureID.ToString(); diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs index c011776..008233b 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps { UUID capuuid = UUID.Random(); - m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); +// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); caps.RegisterHandler("ObjectAdd", new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/", diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..7b94202 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1161,9 +1161,9 @@ namespace OpenSim.Region.Framework.Scenes friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); } - m_log.DebugFormat( - "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", +// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); } /// diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index f985ab2..ebd6f7c 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -661,7 +661,7 @@ namespace OpenSim.Services.LLLoginService protected virtual ArrayList GetInventoryLibrary(ILibraryService library) { Dictionary rootFolders = library.GetAllFolders(); - m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count); +// m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count); //Dictionary rootFolders = new Dictionary(); ArrayList folderHashes = new ArrayList(); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 281b6e3..7568870 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -282,7 +282,7 @@ namespace OpenSim.Services.LLLoginService // Get active gestures List gestures = m_InventoryService.GetActiveGestures(account.PrincipalID); - m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count); +// m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count); // // Login the presence -- cgit v1.1 From 3083c517a01b4265434f9286aa1c95b2b513549b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:29:10 +0000 Subject: minor: resolve some mono compiler warnings --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- OpenSim/Services/HypergridService/GatekeeperService.cs | 2 +- OpenSim/Services/HypergridService/HGInventoryService.cs | 2 +- OpenSim/Services/HypergridService/UserAccountCache.cs | 7 ++++--- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 004e20c..cff2cf4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -849,7 +849,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void RequestInventoryFile(IClientAPI client, IXfer xferManager) { - bool changed = CreateInventoryFile(); + CreateInventoryFile(); if (m_inventorySerial == 0) // No inventory { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7b94202..03cd90f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void CompleteMovement(IClientAPI client) { - DateTime startTime = DateTime.Now; +// DateTime startTime = DateTime.Now; m_log.DebugFormat( "[SCENE PRESENCE]: Completing movement of {0} into region {1}", diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index bbddd87..b66bfed 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -303,7 +303,7 @@ namespace OpenSim.Services.HypergridService return m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); else { - Object[] args = new Object[] { userURL }; +// Object[] args = new Object[] { userURL }; IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); if (userAgentService != null) { diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 9ee1ae4..4b02698 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -53,7 +53,7 @@ namespace OpenSim.Services.HypergridService LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - protected new IXInventoryData m_Database; + protected IXInventoryData m_Database; private string m_ProfileServiceURL; private IUserAccountService m_UserAccountService; diff --git a/OpenSim/Services/HypergridService/UserAccountCache.cs b/OpenSim/Services/HypergridService/UserAccountCache.cs index 3e9aea1..65f9dd5 100644 --- a/OpenSim/Services/HypergridService/UserAccountCache.cs +++ b/OpenSim/Services/HypergridService/UserAccountCache.cs @@ -13,9 +13,10 @@ namespace OpenSim.Services.HypergridService { private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); + private ExpiringCache m_UUIDCache; private IUserAccountService m_UserAccountService; -- cgit v1.1 From 624bf23abb3f7cf58447c73cff5187963945a15a Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 17 Jan 2011 16:39:53 -0800 Subject: force objectId to UUID.Zero for non-overridden animations in AvatarAnimation packet --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index c765e68..e43e3c9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3465,7 +3465,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP ani.AnimationList[i].AnimSequenceID = seqs[i]; ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock(); - ani.AnimationSourceList[i].ObjectID = objectIDs[i]; + if (objectIDs[i].Equals(sourceAgentId)) + ani.AnimationSourceList[i].ObjectID = UUID.Zero; + else + ani.AnimationSourceList[i].ObjectID = objectIDs[i]; } ani.Header.Reliable = false; OutPacket(ani, ThrottleOutPacketType.Task); -- cgit v1.1 From 31144a62b34cf84cbc2c5508924294334fb76979 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 17 Jan 2011 21:22:32 +0100 Subject: Change gesture activation to not quash any other flags --- OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 7303fe7..914990c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures item = invService.GetItem(item); if (item != null) { - item.Flags = 1; + item.Flags |= 1; invService.UpdateItem(item); } else @@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures item = invService.GetItem(item); if (item != null) { - item.Flags = 0; + item.Flags &= ~1; invService.UpdateItem(item); } else @@ -93,4 +93,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures "[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name); } } -} \ No newline at end of file +} -- cgit v1.1 From 75644e0f6e08e5b5866af3a44afcf1308b9513f1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 18 Jan 2011 00:55:08 +0100 Subject: Prevent activation and deactivation of gestures from clobbering the slam bits --- OpenSim/Data/MySQL/MySQLInventoryData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 2dca3eb..9d70acb 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -867,7 +867,7 @@ namespace OpenSim.Data.MySQL dbcon.Open(); using (MySqlCommand sqlCmd = new MySqlCommand( - "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", dbcon)) + "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags & 1", dbcon)) { sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString()); sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); -- cgit v1.1 From c98d1cffe222085378ef8a9935f956882eae4ee9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 17:40:48 -0800 Subject: Removed the call to sceneViewer.Reset upon MakeRoot and ChildAgentUpdate, because Reset hangs for a long time waiting for the lock. That is a problem in itself -- that long holding of the lock by some thread -- but let's just avoid it altogether. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..f811f3e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -928,10 +928,6 @@ namespace OpenSim.Region.Framework.Scenes //else // m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); - // On the next prim update, all objects will be sent - // - m_sceneViewer.Reset(); - m_isChildAgent = false; // send the animations of the other presences to me @@ -2952,10 +2948,6 @@ namespace OpenSim.Region.Framework.Scenes if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) ControllingClient.SetChildAgentThrottle(cAgentData.Throttles); - // Sends out the objects in the user's draw distance if m_sendTasksToChild is true. - if (m_scene.m_seeIntoRegionFromNeighbor) - m_sceneViewer.Reset(); - //cAgentData.AVHeight; m_rootRegionHandle = cAgentData.RegionHandle; //m_velocity = cAgentData.Velocity; -- cgit v1.1 From f73c90c63389cbdf568fd66840268b913f7f84da Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 17:52:03 -0800 Subject: Put the 'new' back to avoid a warning. Yes, we want to hide it. --- OpenSim/Services/HypergridService/HGInventoryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 4b02698..9ee1ae4 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -53,7 +53,7 @@ namespace OpenSim.Services.HypergridService LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - protected IXInventoryData m_Database; + protected new IXInventoryData m_Database; private string m_ProfileServiceURL; private IUserAccountService m_UserAccountService; -- cgit v1.1 From 06e225bc0b881ca38f73b2598263c90c4bd129f2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 18 Jan 2011 01:31:14 +0000 Subject: Also fix MySQLXInventoryData --- OpenSim/Data/MySQL/MySQLXInventoryData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 3c73095..287c4dd 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs @@ -130,7 +130,7 @@ namespace OpenSim.Data.MySQL { using (MySqlCommand cmd = new MySqlCommand()) { - cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags = 1", m_Realm); + cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); cmd.Parameters.AddWithValue("?uuid", principalID.ToString()); cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); -- cgit v1.1 From 9f7b37b37cb746c603642df3c99e90f6ed0059ce Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 18 Jan 2011 01:48:28 +0000 Subject: Fix build break --- OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 914990c..7df2beb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures item = invService.GetItem(item); if (item != null) { - item.Flags &= ~1; + item.Flags &= ~(uint)1; invService.UpdateItem(item); } else -- cgit v1.1 From 7f000ea88e3fb09ae1e6cb725ff6c32bef03e3bd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 00:33:25 +0000 Subject: Correct "show queues" to show queued packet numbers for each client instead of bytes. Byte amounts aren't actually available - this was a misunderstanding of TokenBucket.Content. But raw packet numbers are. --- OpenSim/Region/Application/OpenSim.cs | 24 +++++++++++----------- .../Region/ClientStack/LindenUDP/LLUDPClient.cs | 18 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 51eb396..07c1e67 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1014,22 +1014,22 @@ namespace OpenSim report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); report.AppendFormat( - "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", - "Packets", - "Packets", + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "Pkts", + "Pkts", "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes"); + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts"); report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", "Out", "In", "Unacked", diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index e02783a..d4c3307 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs @@ -256,18 +256,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string GetStats() { return string.Format( - "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}", + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}", PacketsSent, PacketsReceived, UnackedBytes, - m_throttleCategories[(int)ThrottleOutPacketType.Resend].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Land].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Wind].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Cloud].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Task].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Texture].Content, - m_throttleCategories[(int)ThrottleOutPacketType.Asset].Content, - m_throttleCategories[(int)ThrottleOutPacketType.State].Content); + m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Wind].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Cloud].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Task].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Texture].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.Asset].Count, + m_packetOutboxes[(int)ThrottleOutPacketType.State].Count); } public void SendPacketStats() -- cgit v1.1 From 97c0430093a7d66551b3502c5f4a81bae54d7250 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 01:10:09 +0000 Subject: Downgrade and comment out some other caps messages for now --- .../CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs index 09b9719..e11e252 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps { UUID capID = UUID.Random(); - m_log.Info("[UploadObjectAssetModule]: /CAPS/" + capID); +// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); caps.RegisterHandler("UploadObjectAsset", new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/", delegate(Hashtable m_dhttpMethod) @@ -156,7 +156,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps } catch (Exception ex) { - m_log.Error("[UploadObjectAssetModule]: Error deserializing message " + ex.ToString()); + m_log.Error("[UPLOAD OBJECT ASSET MODULE]: Error deserializing message " + ex.ToString()); message = null; } @@ -363,9 +363,8 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps responsedata["str_response_string"] = String.Format("local_id{0}", ConvertUintToBytes(allparts[0].LocalId)); return responsedata; - - } + private string ConvertUintToBytes(uint val) { byte[] resultbytes = Utils.UIntToBytes(val); @@ -374,4 +373,4 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps return String.Format("{0}", Convert.ToBase64String(resultbytes)); } } -} +} \ No newline at end of file -- cgit v1.1 From a42faca5b92f5c17c16b79fcf0df446d1aa08ae1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 01:13:10 +0000 Subject: With mic's permission, adjust long call time info messages to 500ms from 200ms --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 5 +++-- OpenSim/Framework/WebUtil.cs | 2 +- .../Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 86ad7aa..d4ee7ba 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer // Every month or so this will wrap and give bad numbers, not really a problem // since its just for reporting, 200ms limit can be adjusted int tickdiff = Environment.TickCount - tickstart; - if (tickdiff > 200) - m_log.InfoFormat("[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms",reqnum,request.RawUrl,tickdiff); + if (tickdiff > 500) + m_log.InfoFormat( + "[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff); } } diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index d88d095..d731ac5 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -58,7 +58,7 @@ namespace OpenSim.Framework // number of milliseconds a call can take before it is considered // a "long" call for warning & debugging purposes - public const int LongCallTime = 200; + public const int LongCallTime = 500; /// /// Send LLSD to an HTTP client in application/llsd+json form diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs index af26b2b..63fad88 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs @@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets { UUID capID = UUID.Random(); - m_log.Info("[GETMESH]: /CAPS/" + capID); +// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); caps.RegisterHandler("NewFileAgentInventoryVariablePrice", new LLSDStreamhandler("POST", -- cgit v1.1 From 28fda1cab60d3a403537a0606416a7c008fe6183 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 01:41:32 +0000 Subject: with mic's permission, reduce appearance, baked texture logging verbosity for now --- OpenSim/Framework/Capabilities/Caps.cs | 8 ++++---- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index dbb0781..c2f9c3a 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -765,8 +765,8 @@ namespace OpenSim.Framework.Capabilities { try { - m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + - m_regionName); +// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + +// m_regionName); string capsBase = "/CAPS/" + m_capsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); @@ -1332,7 +1332,7 @@ namespace OpenSim.Framework.Capabilities newAssetID = UUID.Random(); uploaderPath = path; httpListener = httpServer; - m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); +// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); } /// @@ -1360,7 +1360,7 @@ namespace OpenSim.Framework.Capabilities httpListener.RemoveStreamHandler("POST", uploaderPath); - m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); +// m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); return res; } diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 7d6d191..ed0a290 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.InfoFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId); // If we only found default textures, then the appearance is not cached return (defonly ? false : true); @@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return; } - m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId); +// m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}", client.AgentId); // TODO: This is probably not necessary any longer, just assume the // textureEntry set implies that the appearance transaction is complete @@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; - m_log.InfoFormat("[AVFACTORY]: received texture update for {0}",client.AgentId); + m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", client.AgentId); Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); }); // This appears to be set only in the final stage of the appearance -- cgit v1.1 From d3dca7d25a405ec9f1f5a3272ea50e4cbdce551c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 01:50:02 +0000 Subject: For now, comment out logging messages about IM sending, since these cause high spam for large group messaging --- .../CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 21a61a7..77c7147 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage if (!user.IsChildAgent) { // Local message - m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); +// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); user.ControllingClient.SendInstantMessage(im); // Message sent @@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage // Local message ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; - m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); +// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); user.ControllingClient.SendInstantMessage(im); // Message sent @@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } } - m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); +// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); SendGridInstantMessageViaXMLRPC(im, result); return; -- cgit v1.1 From b0aebc6f3d8d0a9b086b4af3c8ad81c2daba7610 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 21:41:48 +0000 Subject: minor: make "show info" help slightly clearer --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index cbab2db..865a0ed 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -175,7 +175,7 @@ namespace OpenSim.Framework.Servers m_console.Commands.AddCommand("base", false, "show info", "show info", - "Show general information", HandleShow); + "Show general information about the server", HandleShow); m_console.Commands.AddCommand("base", false, "show stats", "show stats", -- cgit v1.1 From f50780f4c2619e74def4c6d39ad5d763b9b64234 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 21:56:48 +0000 Subject: remove unimplemented "show assets" command --- OpenSim/Region/Application/OpenSim.cs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 07c1e67..1832c3d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -283,10 +283,6 @@ namespace OpenSim "kick user [message]", "Kick a user off the simulator", KickUserCommand); - m_console.Commands.AddCommand("region", false, "show assets", - "show assets", - "Show asset data", HandleShow); - m_console.Commands.AddCommand("region", false, "show users", "show users [full]", "Show user data for users currently on the region", @@ -869,10 +865,6 @@ namespace OpenSim switch (showParams[0]) { - case "assets": - MainConsole.Instance.Output("Not implemented."); - break; - case "users": IList agents; if (showParams.Length > 1 && showParams[1] == "full") -- cgit v1.1 From 1baf63dbae8208172aa457963636116d42dbe9b3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 22:57:12 +0000 Subject: Move "show queues" command out of OpenSim.cs and into a separate module. --- OpenSim/Region/Application/OpenSim.cs | 99 ---------- .../Agent/UDP/Linden/LindenUDPModule.cs | 200 +++++++++++++++++++++ 2 files changed, 200 insertions(+), 99 deletions(-) create mode 100644 OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 1832c3d..00a97be 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -301,13 +301,6 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "show regions", "show regions", "Show region data", HandleShow); - - m_console.Commands.AddCommand("region", false, "show queues", - "show queues [full]", - "Show queue data for each client", - "Without the 'full' option, only users actually on the region are shown." - + " With the 'full' option child agents of users in neighbouring regions are also shown.", - HandleShow); m_console.Commands.AddCommand("region", false, "show ratings", "show ratings", @@ -951,10 +944,6 @@ namespace OpenSim }); break; - case "queues": - Notice(GetQueuesReport(showParams)); - break; - case "ratings": m_sceneManager.ForEachScene( delegate(Scene scene) @@ -982,94 +971,6 @@ namespace OpenSim } /// - /// Generate UDP Queue data report for each client - /// - /// - /// - private string GetQueuesReport(string[] showParams) - { - bool showChildren = false; - - if (showParams.Length > 1 && showParams[1] == "full") - showChildren = true; - - StringBuilder report = new StringBuilder(); - - int columnPadding = 2; - int maxNameLength = 18; - int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); - - 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", - "Pkts", - "Pkts", - "Bytes", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "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", - "In", - "Unacked", - "Resend", - "Land", - "Wind", - "Cloud", - "Task", - "Texture", - "Asset", - "State"); - - m_sceneManager.ForEachScene( - delegate(Scene scene) - { - scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is IStatsCollector) - { - bool isChild = scene.PresenceChildStatus(client.AgentId); - if (isChild && !showChildren) - return; - - string name = client.Name; - string regionName = scene.RegionInfo.RegionName; - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); - - IStatsCollector stats = (IStatsCollector)client; - - report.AppendLine(stats.Report()); - } - }); - }); - - return report.ToString(); - } - - /// /// Use XML2 format to serialize data to a file /// /// diff --git a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs new file mode 100644 index 0000000..3240434 --- /dev/null +++ b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs @@ -0,0 +1,200 @@ +/* + * 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 log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Console; +using OpenSim.Framework.Statistics; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.CoreModules.UDP.Linden +{ + /// + /// A module that just holds commands for inspecting/changing the Linden UDP client stack + /// + /// + /// All actual client stack functionality remains in OpenSim.Region.ClientStack.LindenUDP + /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPModule")] + public class LindenUDPModule : ISharedRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + protected Dictionary m_scenes = new Dictionary(); + + public string Name { get { return "Linden UDP Module"; } } + + public Type ReplaceableInterface { get { return null; } } + + public void Initialise(IConfigSource source) + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: INITIALIZED MODULE"); + } + + public void PostInitialise() + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: POST INITIALIZED MODULE"); + } + + public void Close() + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: CLOSED MODULE"); + } + + public void AddRegion(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); + + lock (m_scenes) + m_scenes[scene.RegionInfo.RegionID] = scene; + + scene.AddCommand( + this, "show queues", + "show queues [full]", + "Show queue data for each client", + "Without the 'full' option, only users actually on the region are shown." + + " With the 'full' option child agents of users in neighbouring regions are also shown.", + ShowQueuesReport); + } + + public void RemoveRegion(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); + + lock (m_scenes) + m_scenes.Remove(scene.RegionInfo.RegionID); + } + + public void RegionLoaded(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); + } + + protected void ShowQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetQueuesReport(cmd)); + } + + /// + /// Generate UDP Queue data report for each client + /// + /// + /// + protected string GetQueuesReport(string[] showParams) + { + bool showChildren = false; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); + report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); + report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); + + 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", + "Pkts", + "Pkts", + "Bytes", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "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", + "In", + "Unacked", + "Resend", + "Land", + "Wind", + "Cloud", + "Task", + "Texture", + "Asset", + "State"); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is IStatsCollector) + { + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + string regionName = scene.RegionInfo.RegionName; + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", + isChild ? "Cd" : "Rt", ""); + + IStatsCollector stats = (IStatsCollector)client; + + report.AppendLine(stats.Report()); + } + }); + } + } + + return report.ToString(); + } + } +} \ No newline at end of file -- cgit v1.1 From df740d8e5c2ce5f43eac11917390b783b4d91230 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 23:21:25 +0000 Subject: remove reference to CoreModules from ClientStack.LindenUDP client stack uses modules in the same way that scene does - through their interfaces --- OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs index 3240434..11e3f4a 100644 --- a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs +++ b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Show queue data for each client", "Without the 'full' option, only users actually on the region are shown." + " With the 'full' option child agents of users in neighbouring regions are also shown.", - ShowQueuesReport); + ShowQueuesReport); } public void RemoveRegion(Scene scene) @@ -195,6 +195,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden } return report.ToString(); - } + } } } \ No newline at end of file -- cgit v1.1 From 58eb6b5fa3f95c2bd649329de5b1c9789e9861be Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 23:22:45 +0000 Subject: minor: help text adjustment for "show queues" --- OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs index 11e3f4a..29583dc 100644 --- a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs +++ b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs @@ -84,8 +84,8 @@ namespace OpenSim.Region.CoreModules.UDP.Linden this, "show queues", "show queues [full]", "Show queue data for each client", - "Without the 'full' option, only users actually on the region are shown." - + " With the 'full' option child agents of users in neighbouring regions are also shown.", + "Without the 'full' option, only root agents are shown." + + " With the 'full' option child agents are also shown.", ShowQueuesReport); } -- cgit v1.1 From c383dbd06dd98ca96543c9bfdf9a7376a7e55cc2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 00:38:16 +0000 Subject: implement "show throttles" command for showing current agent throttles and the server settings. This is in a very crude state, currently. The LindenUDPModule was renamed LindenUDPInfoModule and moved to OptionalModules OptionalModules was given a direct reference to OpenSim.Region.ClientStack.LindenUDP so that it can inspect specific LindenUDP settings without having to generalize those to all client views (some of which may have no concept of the settings involved). This might be ess messy if OpenSim.Region.ClientStack.LindenUDP were a region module instead, like MXP, IRC and NPC --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 1 + .../Region/ClientStack/LindenUDP/LLUDPServer.cs | 8 +- .../Agent/UDP/Linden/LindenUDPModule.cs | 200 ------------- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 330 +++++++++++++++++++++ 4 files changed, 336 insertions(+), 203 deletions(-) delete mode 100644 OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs create mode 100644 OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e43e3c9..5dab1bc 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -368,6 +368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Properties public LLUDPClient UDPClient { get { return m_udpClient; } } + public LLUDPServer UDPServer { get { return m_udpServer; } } public IPEndPoint RemoteEndPoint { get { return m_udpClient.RemoteEndPoint; } } public UUID SecureSessionId { get { return m_secureSessionId; } } public IScene Scene { get { return m_scene; } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 571624b..df8ddbb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -114,8 +114,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP //private UDPClientCollection m_clients = new UDPClientCollection(); /// Bandwidth throttle for this UDP server protected TokenBucket m_throttle; + /// Bandwidth throttle rates for this UDP server - protected ThrottleRates m_throttleRates; + public ThrottleRates ThrottleRates { get; private set; } + /// Manages authentication for agent circuits private AgentCircuitManager m_circuitManager; /// Reference to the scene this UDP server is attached to @@ -226,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion BinaryStats m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps); - m_throttleRates = new ThrottleRates(configSource); + ThrottleRates = new ThrottleRates(configSource); } public void Start() @@ -922,7 +924,7 @@ 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, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); + LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); IClientAPI existingClient; if (!m_scene.TryGetClient(agentID, out existingClient)) diff --git a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs b/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs deleted file mode 100644 index 29583dc..0000000 --- a/OpenSim/Region/CoreModules/Agent/UDP/Linden/LindenUDPModule.cs +++ /dev/null @@ -1,200 +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 System; -using System.Collections.Generic; -using System.Reflection; -using System.Text; -using log4net; -using Mono.Addins; -using Nini.Config; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Framework.Statistics; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.CoreModules.UDP.Linden -{ - /// - /// A module that just holds commands for inspecting/changing the Linden UDP client stack - /// - /// - /// All actual client stack functionality remains in OpenSim.Region.ClientStack.LindenUDP - /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPModule")] - public class LindenUDPModule : ISharedRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - protected Dictionary m_scenes = new Dictionary(); - - public string Name { get { return "Linden UDP Module"; } } - - public Type ReplaceableInterface { get { return null; } } - - public void Initialise(IConfigSource source) - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: INITIALIZED MODULE"); - } - - public void PostInitialise() - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: POST INITIALIZED MODULE"); - } - - public void Close() - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: CLOSED MODULE"); - } - - public void AddRegion(Scene scene) - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); - - lock (m_scenes) - m_scenes[scene.RegionInfo.RegionID] = scene; - - scene.AddCommand( - this, "show queues", - "show queues [full]", - "Show queue data for each client", - "Without the 'full' option, only root agents are shown." - + " With the 'full' option child agents are also shown.", - ShowQueuesReport); - } - - public void RemoveRegion(Scene scene) - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - - lock (m_scenes) - m_scenes.Remove(scene.RegionInfo.RegionID); - } - - public void RegionLoaded(Scene scene) - { -// m_log.DebugFormat("[LINDEN UDP MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); - } - - protected void ShowQueuesReport(string module, string[] cmd) - { - MainConsole.Instance.Output(GetQueuesReport(cmd)); - } - - /// - /// Generate UDP Queue data report for each client - /// - /// - /// - protected string GetQueuesReport(string[] showParams) - { - bool showChildren = false; - - if (showParams.Length > 2 && showParams[2] == "full") - showChildren = true; - - StringBuilder report = new StringBuilder(); - - int columnPadding = 2; - int maxNameLength = 18; - int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); - - 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", - "Pkts", - "Pkts", - "Bytes", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "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", - "In", - "Unacked", - "Resend", - "Land", - "Wind", - "Cloud", - "Task", - "Texture", - "Asset", - "State"); - - lock (m_scenes) - { - foreach (Scene scene in m_scenes.Values) - { - scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is IStatsCollector) - { - bool isChild = scene.PresenceChildStatus(client.AgentId); - if (isChild && !showChildren) - return; - - string name = client.Name; - string regionName = scene.RegionInfo.RegionName; - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); - - IStatsCollector stats = (IStatsCollector)client; - - report.AppendLine(stats.Report()); - } - }); - } - } - - return report.ToString(); - } - } -} \ No newline at end of file diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs new file mode 100644 index 0000000..480df31 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -0,0 +1,330 @@ +/* + * 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 log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Console; +using OpenSim.Framework.Statistics; +using OpenSim.Region.ClientStack.LindenUDP; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.CoreModules.UDP.Linden +{ + /// + /// A module that just holds commands for inspecting the current state of the Linden UDP stack. + /// + /// + /// All actual client stack functionality remains in OpenSim.Region.ClientStack.LindenUDP + /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] + public class LindenUDPInfoModule : ISharedRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + protected Dictionary m_scenes = new Dictionary(); + + public string Name { get { return "Linden UDP Module"; } } + + public Type ReplaceableInterface { get { return null; } } + + public void Initialise(IConfigSource source) + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); + } + + public void PostInitialise() + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); + } + + public void Close() + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); + } + + public void AddRegion(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); + + lock (m_scenes) + m_scenes[scene.RegionInfo.RegionID] = scene; + + scene.AddCommand( + this, "show queues", + "show queues [full]", + "Show queue data for each client", + "Without the 'full' option, only root agents are shown." + + " With the 'full' option child agents are also shown.", + ShowQueuesReport); + + scene.AddCommand( + this, "show throttles", + "show throttles [full]", + "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); + } + + public void RemoveRegion(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); + + lock (m_scenes) + m_scenes.Remove(scene.RegionInfo.RegionID); + } + + public void RegionLoaded(Scene scene) + { +// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); + } + + protected void ShowQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetQueuesReport(cmd)); + } + + protected void ShowThrottlesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetThrottlesReport(cmd)); + } + + /// + /// Generate UDP Queue data report for each client + /// + /// + /// + protected string GetQueuesReport(string[] showParams) + { + bool showChildren = false; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); + report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); + report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); + + 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", + "Pkts", + "Pkts", + "Bytes", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "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", + "In", + "Unacked", + "Resend", + "Land", + "Wind", + "Cloud", + "Task", + "Texture", + "Asset", + "State"); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is IStatsCollector) + { + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + string regionName = scene.RegionInfo.RegionName; + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", + isChild ? "Cd" : "Rt", ""); + + IStatsCollector stats = (IStatsCollector)client; + + report.AppendLine(stats.Report()); + } + }); + } + } + + return report.ToString(); + } + + /// + /// Show throttle data + /// + /// + /// + protected string GetThrottlesReport(string[] showParams) + { + bool showChildren = false; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); + report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); + report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type\n", ""); + + bool firstClient = true; + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + + if (firstClient) + { + report.AppendLine(GetServerThrottlesReport(llClient.UDPServer, scene)); + firstClient = false; + } + + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + string regionName = scene.RegionInfo.RegionName; + + LLUDPClient llUdpClient = llClient.UDPClient; + ClientInfo ci = llUdpClient.GetClientInfo(); + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", + isChild ? "Cd" : "Rt", ""); + + report.Append((ci.totalThrottle * 8) / 1000 + " "); + report.Append((ci.resendThrottle * 8) / 1000 + " "); + report.Append((ci.landThrottle * 8) / 1000 + " "); + report.Append((ci.windThrottle * 8) / 1000 + " "); + report.Append((ci.cloudThrottle * 8) / 1000 + " "); + report.Append((ci.taskThrottle * 8) / 1000 + " "); + report.Append((ci.textureThrottle * 8) / 1000 + " "); + report.Append((ci.assetThrottle * 8) / 1000 + " "); + + report.AppendLine(); + } + }); + } + } + + return report.ToString(); + } + + protected string GetServerThrottlesReport(LLUDPServer udpServer, Scene scene) + { + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + string name = "SERVER LIMITS"; + string regionName = scene.RegionInfo.RegionName; + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "n/a", ""); + + ThrottleRates throttleRates = udpServer.ThrottleRates; + report.Append("n/a"); + report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); + report.Append((throttleRates.LandLimit * 8) / 1000 + " "); + report.Append((throttleRates.WindLimit * 8) / 1000 + " "); + report.Append((throttleRates.CloudLimit * 8) / 1000 + " "); + report.Append((throttleRates.TaskLimit * 8) / 1000 + " "); + report.Append((throttleRates.TextureLimit * 8) / 1000 + " "); + report.Append((throttleRates.AssetLimit * 8) / 1000 + " "); + + return report.ToString(); + } + } +} \ No newline at end of file -- cgit v1.1 From 38debbc59fe29d2b0bb6ea1f075e43c960f53676 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 00:56:37 +0000 Subject: crudely refactor table generation code for "show queues" and "show throttles" --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 71 +++++++++------------- 1 file changed, 30 insertions(+), 41 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 480df31..0a256a1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -121,6 +121,14 @@ namespace OpenSim.Region.CoreModules.UDP.Linden MainConsole.Instance.Output(GetThrottlesReport(cmd)); } + protected string GetColumnEntry(string entry, int maxLength, int columnPadding) + { + return string.Format( + "{0,-" + maxLength + "}{1,-" + columnPadding + "}", + entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, + ""); + } + /// /// Generate UDP Queue data report for each client /// @@ -140,10 +148,10 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int maxRegionNameLength = 14; int maxTypeLength = 4; int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); + + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); + report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); + 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", @@ -190,15 +198,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden string name = client.Name; string regionName = scene.RegionInfo.RegionName; - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); IStatsCollector stats = (IStatsCollector)client; @@ -228,12 +230,11 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type\n", ""); + int maxTypeLength = 4; + + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); + report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("Type\n", maxTypeLength, columnPadding)); bool firstClient = true; @@ -263,16 +264,10 @@ namespace OpenSim.Region.CoreModules.UDP.Linden LLUDPClient llUdpClient = llClient.UDPClient; ClientInfo ci = llUdpClient.GetClientInfo(); - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); + + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.Append((ci.totalThrottle * 8) / 1000 + " "); report.Append((ci.resendThrottle * 8) / 1000 + " "); @@ -299,23 +294,17 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + int maxTypeLength = 4; string name = "SERVER LIMITS"; string regionName = scene.RegionInfo.RegionName; - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "n/a", ""); + + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("n/a", maxTypeLength, columnPadding)); ThrottleRates throttleRates = udpServer.ThrottleRates; - report.Append("n/a"); + report.Append("n/a "); report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); report.Append((throttleRates.LandLimit * 8) / 1000 + " "); report.Append((throttleRates.WindLimit * 8) / 1000 + " "); -- cgit v1.1 From 9971fdbcd5910a73f81d0a970bc3d49aad6a7d95 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:31:46 +0000 Subject: properly format "show throttles" table --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 81 +++++++++++++++------- 1 file changed, 55 insertions(+), 26 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 0a256a1..9a5f2ed 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -230,11 +230,37 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry("Type\n", maxTypeLength, columnPadding)); + report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); + + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + "Total", + "Resend", + "Land", + "Wind", + "Cloud", + "Task", + "Texture", + "Asset"); + + report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s"); + + report.AppendLine(); bool firstClient = true; @@ -251,7 +277,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden if (firstClient) { - report.AppendLine(GetServerThrottlesReport(llClient.UDPServer, scene)); + report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); firstClient = false; } @@ -268,15 +294,17 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); - - report.Append((ci.totalThrottle * 8) / 1000 + " "); - report.Append((ci.resendThrottle * 8) / 1000 + " "); - report.Append((ci.landThrottle * 8) / 1000 + " "); - report.Append((ci.windThrottle * 8) / 1000 + " "); - report.Append((ci.cloudThrottle * 8) / 1000 + " "); - report.Append((ci.taskThrottle * 8) / 1000 + " "); - report.Append((ci.textureThrottle * 8) / 1000 + " "); - report.Append((ci.assetThrottle * 8) / 1000 + " "); + + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + (ci.totalThrottle * 8) / 1000, + (ci.resendThrottle * 8) / 1000, + (ci.landThrottle * 8) / 1000, + (ci.windThrottle * 8) / 1000, + (ci.cloudThrottle * 8) / 1000, + (ci.taskThrottle * 8) / 1000, + (ci.textureThrottle * 8) / 1000, + (ci.assetThrottle * 8) / 1000); report.AppendLine(); } @@ -287,31 +315,32 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return report.ToString(); } - protected string GetServerThrottlesReport(LLUDPServer udpServer, Scene scene) + protected string GetServerThrottlesReport(LLUDPServer udpServer) { StringBuilder report = new StringBuilder(); int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; + int maxTypeLength = 4; - string name = "SERVER LIMITS"; - string regionName = scene.RegionInfo.RegionName; + string name = "SERVER AGENT LIMITS"; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); - report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry("n/a", maxTypeLength, columnPadding)); + report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("-", maxTypeLength, columnPadding)); ThrottleRates throttleRates = udpServer.ThrottleRates; - report.Append("n/a "); - report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); - report.Append((throttleRates.LandLimit * 8) / 1000 + " "); - report.Append((throttleRates.WindLimit * 8) / 1000 + " "); - report.Append((throttleRates.CloudLimit * 8) / 1000 + " "); - report.Append((throttleRates.TaskLimit * 8) / 1000 + " "); - report.Append((throttleRates.TextureLimit * 8) / 1000 + " "); - report.Append((throttleRates.AssetLimit * 8) / 1000 + " "); + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "n/a", + (throttleRates.ResendLimit * 8) / 1000, + (throttleRates.LandLimit * 8) / 1000, + (throttleRates.WindLimit * 8) / 1000, + (throttleRates.CloudLimit * 8) / 1000, + (throttleRates.TaskLimit * 8) / 1000, + (throttleRates.TextureLimit * 8) / 1000, + (throttleRates.AssetLimit * 8) / 1000); return report.ToString(); } -- cgit v1.1 From 6ef7ea454c966b5eee2702a5fcbf9f48f85db48d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:48:04 +0000 Subject: Remove old 2 year unused linden stack region module shell --- OpenSim/Client/Linden/LLClientStackModule.cs | 136 --------------------- .../Linden/Resources/LindenModules.addin.xml | 13 -- 2 files changed, 149 deletions(-) delete mode 100644 OpenSim/Client/Linden/LLClientStackModule.cs delete mode 100644 OpenSim/Client/Linden/Resources/LindenModules.addin.xml (limited to 'OpenSim') diff --git a/OpenSim/Client/Linden/LLClientStackModule.cs b/OpenSim/Client/Linden/LLClientStackModule.cs deleted file mode 100644 index f882d5d..0000000 --- a/OpenSim/Client/Linden/LLClientStackModule.cs +++ /dev/null @@ -1,136 +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 System; -using System.Collections.Generic; -using System.Net; -using System.Reflection; -using System.Text; -using log4net; -using Nini.Config; -using OpenMetaverse; -using OpenSim.Region.ClientStack; -using OpenSim.Region.ClientStack.LindenUDP; -using OpenSim.Framework; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Framework.Interfaces; - -namespace OpenSim.Client.Linden -{ - /// - /// Linden UDP Stack Region Module - /// - public class LLClientStackModule : INonSharedRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - #region IRegionModule Members - - /// - /// Scene that contains the region's data - /// - protected Scene m_scene; - protected bool m_createClientStack = false; - protected IClientNetworkServer m_clientServer; - protected ClientStackManager m_clientStackManager; - protected IConfigSource m_source; - - protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll"; - - public void Initialise(IConfigSource source) - { - if (m_scene == null) - { - m_source = source; - - IConfig startupConfig = m_source.Configs["Startup"]; - if (startupConfig != null) - { - m_clientStackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); - } - } - } - - public void AddRegion(Scene scene) - { - - } - - public void RemoveRegion(Scene scene) - { - - } - - public void RegionLoaded(Scene scene) - { - if (m_scene == null) - { - m_scene = scene; - } - - if ((m_scene != null) && (m_createClientStack)) - { - m_log.Info("[LLClientStackModule] Starting up LLClientStack."); - IPEndPoint endPoint = m_scene.RegionInfo.InternalEndPoint; - - uint port = (uint)endPoint.Port; - m_clientStackManager = new ClientStackManager(m_clientStackDll); - - m_clientServer - = m_clientStackManager.CreateServer(endPoint.Address, - ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source, - m_scene.AuthenticateHandler); - - m_clientServer.AddScene(m_scene); - - m_clientServer.Start(); - } - } - - public void Close() - { - - } - - public Type ReplaceableInterface - { - get { return null; } - } - - public string Name - { - get { return "LLClientStackModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion - } -} diff --git a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml b/OpenSim/Client/Linden/Resources/LindenModules.addin.xml deleted file mode 100644 index af41e98..0000000 --- a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - -- cgit v1.1 From 5f3f7c3405e94ef6d7ea83a89083ab16bcef5719 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:48:49 +0000 Subject: minor: remove unnecessary newline from "show throttles" information --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 9a5f2ed..87d067c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", (ci.totalThrottle * 8) / 1000, (ci.resendThrottle * 8) / 1000, (ci.landThrottle * 8) / 1000, -- cgit v1.1 From bf5ec8cb88219c8fefd7b396d5bd03110d3fa0e5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:51:52 +0000 Subject: remove some mono compiler warnings and unnecessary dictionary instantiations --- OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs | 2 +- OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | 3 ++- OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs | 6 +++--- OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | 6 +++--- OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | 9 --------- OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | 2 -- .../Server/Handlers/Simulation/SimulationServiceInConnector.cs | 2 +- 7 files changed, 10 insertions(+), 20 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs index c9e80d9..8472d34 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs @@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Grid { public class GridInfoServerInConnector : ServiceConnector { - private string m_ConfigName = "GridInfoService"; +// private string m_ConfigName = "GridInfoService"; public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) : base(config, server, configName) diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index 31eefb1..f3f81b0 100644 --- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs @@ -51,7 +51,8 @@ namespace OpenSim.Server.Handlers.Hypergrid { public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private IGatekeeperService m_GatekeeperService; public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs index 49de8b1..3d0967f 100644 --- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs @@ -41,9 +41,9 @@ namespace OpenSim.Server.Handlers.Hypergrid { public class GatekeeperServiceInConnector : ServiceConnector { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); private IGatekeeperService m_GatekeeperService; public IGatekeeperService GateKeeper diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index e5f6a5d..0e8ce80 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs @@ -47,9 +47,9 @@ namespace OpenSim.Server.Handlers.Hypergrid { public class UserAgentServerConnector : ServiceConnector { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); private IUserAgentService m_HomeUsersService; diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index 00f035c..899f9c0 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs @@ -347,7 +347,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleAddFolder(Dictionary request) { - Dictionary result = new Dictionary(); InventoryFolderBase folder = BuildFolder(request); if (m_InventoryService.AddFolder(folder)) @@ -358,7 +357,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleUpdateFolder(Dictionary request) { - Dictionary result = new Dictionary(); InventoryFolderBase folder = BuildFolder(request); if (m_InventoryService.UpdateFolder(folder)) @@ -369,7 +367,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleMoveFolder(Dictionary request) { - Dictionary result = new Dictionary(); UUID parentID = UUID.Zero; UUID.TryParse(request["ParentID"].ToString(), out parentID); UUID folderID = UUID.Zero; @@ -387,7 +384,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleDeleteFolders(Dictionary request) { - Dictionary result = new Dictionary(); UUID principal = UUID.Zero; UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); List slist = (List)request["FOLDERS"]; @@ -408,7 +404,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandlePurgeFolder(Dictionary request) { - Dictionary result = new Dictionary(); UUID folderID = UUID.Zero; UUID.TryParse(request["ID"].ToString(), out folderID); @@ -421,7 +416,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleAddItem(Dictionary request) { - Dictionary result = new Dictionary(); InventoryItemBase item = BuildItem(request); if (m_InventoryService.AddItem(item)) @@ -432,7 +426,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleUpdateItem(Dictionary request) { - Dictionary result = new Dictionary(); InventoryItemBase item = BuildItem(request); if (m_InventoryService.UpdateItem(item)) @@ -443,7 +436,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleMoveItems(Dictionary request) { - Dictionary result = new Dictionary(); List idlist = (List)request["IDLIST"]; List destlist = (List)request["DESTLIST"]; UUID principal = UUID.Zero; @@ -482,7 +474,6 @@ namespace OpenSim.Server.Handlers.Asset byte[] HandleDeleteItems(Dictionary request) { - Dictionary result = new Dictionary(); UUID principal = UUID.Zero; UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); List slist = (List)request["ITEMS"]; diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 3104917..85bf96e 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs @@ -129,8 +129,6 @@ namespace OpenSim.Server.Handlers.Presence byte[] LogoutAgent(Dictionary request) { UUID session = UUID.Zero; - Vector3 position = Vector3.Zero; - Vector3 lookat = Vector3.Zero; if (!request.ContainsKey("SessionID")) return FailureResult(); diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs index 50d6fb2..f33eda7 100644 --- a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs @@ -38,7 +38,7 @@ namespace OpenSim.Server.Handlers.Simulation public class SimulationServiceInConnector : ServiceConnector { private ISimulationService m_LocalSimulationService; - private IAuthenticationService m_AuthenticationService; +// private IAuthenticationService m_AuthenticationService; public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : base(config, server, String.Empty) -- cgit v1.1 From 43f948d6913ab33a9f5e11c631b0d64b2ef73b04 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 23:05:53 +0000 Subject: add current console log level to "show info" --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 865a0ed..6eb7686 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -371,8 +371,7 @@ namespace OpenSim.Framework.Servers switch (showParams[0]) { case "info": - Notice("Version: " + m_version); - Notice("Startup directory: " + m_startupDirectory); + ShowInfo(); break; case "stats": @@ -395,6 +394,14 @@ namespace OpenSim.Framework.Servers break; } } + + protected void ShowInfo() + { + Notice("Version: " + m_version); + Notice("Startup directory: " + m_startupDirectory); + if (null != m_consoleAppender) + Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); + } /// /// Console output is only possible if a console has been established. -- cgit v1.1 From e44ceaaea3ec42fad63c5437e57e8c96a74e64e0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 23:07:19 +0000 Subject: make "show info" and "show version" show the same version text --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 6eb7686..147fbd5 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -388,20 +388,23 @@ namespace OpenSim.Framework.Servers break; case "version": - Notice( - String.Format( - "Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion)); + Notice(GetVersionText()); break; } } protected void ShowInfo() { - Notice("Version: " + m_version); + Notice(GetVersionText()); Notice("Startup directory: " + m_startupDirectory); if (null != m_consoleAppender) Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); } + + protected string GetVersionText() + { + return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); + } /// /// Console output is only possible if a console has been established. -- cgit v1.1 From 41105948bdb21d8f53ad3aeeb8cfdddb8aa7367c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 23:19:44 +0000 Subject: remove some mono compiler warnings --- .../CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | 4 ++-- OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | 5 +++-- .../Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | 5 +++-- OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs | 5 +++-- .../Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs | 6 ++---- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 6 ++++-- OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 2 +- OpenSim/Region/CoreModules/World/Warp3DMap/Perlin.cs | 4 +--- 8 files changed, 19 insertions(+), 18 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index c66a4ea..771038e 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -41,8 +41,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction /// public class AgentAssetTransactions { - private static readonly ILog m_log = LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); // Fields private bool m_dumpAssetsToFile; diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs index 8347e35..878242a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs @@ -49,8 +49,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class GetMeshModule : INonSharedRegionModule { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private Scene m_scene; private IAssetService m_assetService; diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs index 63fad88..542af25 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs @@ -50,8 +50,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private Scene m_scene; private IAssetService m_assetService; private bool m_dumpAssetsToFile = false; diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs index 008233b..a0d72ed 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs @@ -43,8 +43,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps { public class ObjectAdd : IRegionModule { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private Scene m_scene; #region IRegionModule Members diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs index e11e252..3114d7f 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation); Quaternion rot = Quaternion.Identity; Vector3 rootpos = Vector3.Zero; - Quaternion rootrot = Quaternion.Identity; +// Quaternion rootrot = Quaternion.Identity; SceneObjectGroup rootGroup = null; SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length]; @@ -186,11 +186,9 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps if (i == 0) { rootpos = obj.Position; - rootrot = obj.Rotation; - +// rootrot = obj.Rotation; } - // Combine the extraparams data into it's ugly blob again.... //int bytelength = 0; //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index ddae20f..b0563c5 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -767,6 +767,7 @@ namespace OpenSim.Region.CoreModules.World.Estate LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; icon.EndInvoke(iar); } + private void LookupUUID(List uuidLst) { LookupUUIDS d = LookupUUIDsAsync; @@ -775,6 +776,7 @@ namespace OpenSim.Region.CoreModules.World.Estate LookupUUIDSCompleted, d); } + private void LookupUUIDsAsync(List uuidLst) { UUID[] uuidarr; @@ -789,12 +791,12 @@ namespace OpenSim.Region.CoreModules.World.Estate // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); IUserManagement userManager = m_scene.RequestModuleInterface(); - string userName = "Unkown User"; if (userManager != null) - userName = userManager.GetUserName(uuidarr[i]); + userManager.GetUserName(uuidarr[i]); // we drop it. It gets cached though... so we're ready for the next request. // diva commnent 11/21/2010: uh?!? wft? + // justincc comment 21/01/2011: A side effect of userManager.GetUserName() I presume. } } #endregion diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 8df44fe..09c0ebb 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs @@ -38,7 +38,7 @@ namespace OpenSim.Region.CoreModules.World.Sound { public class SoundModule : IRegionModule, ISoundModule { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Perlin.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Perlin.cs index af59d7a..522a7eb 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Perlin.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Perlin.cs @@ -85,9 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap public static float noise1(float arg) { int bx0, bx1; - float rx0, rx1, sx, t, u, v, a; - - a = arg; + float rx0, rx1, sx, t, u, v; t = arg + N; bx0 = ((int)t) & BM; -- cgit v1.1 From cb14e1d2720fdee0c77280d7c397c02116c278ca Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 23:59:55 +0000 Subject: Update the "config get
" command to "config get [
] []" The config get command shows a current config value on the console. Now, if is omitted then all the values for the given section are printed. If
is ommitted then all sections and all keys are printed. Current config can also be dumped to a file using "config save ". This can be handy for resolving or eliminating config issues --- OpenSim/Framework/Console/ConsoleBase.cs | 5 ++ OpenSim/Framework/Servers/BaseOpenSimServer.cs | 14 ++++++ OpenSim/Region/Application/OpenSim.cs | 66 +++++++++++++++++--------- 3 files changed, 63 insertions(+), 22 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 22ce880..3ef76cf 100755 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -75,6 +75,11 @@ namespace OpenSim.Framework.Console { System.Console.WriteLine(text); } + + public virtual void OutputFormat(string format, params string[] components) + { + Output(string.Format(format, components)); + } public string CmdPrompt(string p) { diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 147fbd5..b28ad69 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -411,6 +411,7 @@ namespace OpenSim.Framework.Servers /// That is something that cannot be determined within this class. So /// all attempts to use the console MUST be verified. ///
+ /// protected void Notice(string msg) { if (m_console != null) @@ -418,6 +419,19 @@ namespace OpenSim.Framework.Servers m_console.Output(msg); } } + + /// + /// Console output is only possible if a console has been established. + /// That is something that cannot be determined within this class. So + /// all attempts to use the console MUST be verified. + /// + /// + /// + protected void Notice(string format, params string[] components) + { + if (m_console != null) + m_console.OutputFormat(format, components); + } /// /// Enhance the version string with extra information if it's available. diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 00a97be..ed4b620 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -324,16 +324,19 @@ namespace OpenSim "Restart all sims in this instance", RunCommand); m_console.Commands.AddCommand("region", false, "config set", - "config set
", - "Set a config option", HandleConfig); + "config set
", + "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); m_console.Commands.AddCommand("region", false, "config get", - "config get
", - "Read a config option", HandleConfig); + "config get [
] []", + "Show a config option", + "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine + + "If a section is given but not a field, then all fields in that section are printed.", + HandleConfig); m_console.Commands.AddCommand("region", false, "config save", - "config save", - "Save current configuration", HandleConfig); + "config save ", + "Save current configuration to a file at the given path", HandleConfig); m_console.Commands.AddCommand("region", false, "command-script", "command-script