From 39b967e21494f839bbee63a2b3835f5ee7a4e536 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 7 Nov 2011 22:53:52 +0000 Subject: [PATCH 01/12] Correct test failure in sit position check of TestSitAndStandWithNoTarget() Curiously, a Vector3.ToString() will not display the last two places of the float. In this case, the failure of the assertion would confusingly report Expected: <0, 0, 0.8454993> But was: <0, 0, 0.8454993> when actual Z figure is 0.845499337 Should fully address http://opensimulator.org/mantis/view.php?id=5779 --- .../Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 6305d272f7..dce0ec8684 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -285,9 +285,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the // default avatar. + // Curiously, Vector3.ToString() will not display the last two places of the float. For example, + // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337> Assert.That( npc.AbsolutePosition, - Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8454993f))); + Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); npcModule.Stand(npc.UUID, scene); From 7e488cd6352acfb50a4c9132e47154ad9545d188 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 7 Nov 2011 23:24:13 +0000 Subject: [PATCH 02/12] Remove unused avariable in PollServiceRequestManager --- .../HttpServer/PollServiceRequestManager.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index d9965b6a64..2206febdb1 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -44,7 +44,6 @@ namespace OpenSim.Framework.Servers.HttpServer private uint m_WorkerThreadCount = 0; private Thread[] m_workerThreads; private PollServiceWorkerThread[] m_PollServiceWorkerThreads; - private Thread m_watcherThread; private bool m_running = true; public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) @@ -69,13 +68,12 @@ namespace OpenSim.Framework.Servers.HttpServer int.MaxValue); } - m_watcherThread - = Watchdog.StartThread( - this.ThreadStart, - "PollServiceWatcherThread", - ThreadPriority.Normal, - false, - 1000 * 60 * 10); + Watchdog.StartThread( + this.ThreadStart, + "PollServiceWatcherThread", + ThreadPriority.Normal, + false, + 1000 * 60 * 10); } internal void ReQueueEvent(PollServiceHttpRequest req) From c081d7b7dd6dfc616c432eef4e28960968cdb9a9 Mon Sep 17 00:00:00 2001 From: nebadon Date: Mon, 7 Nov 2011 17:09:32 -0700 Subject: [PATCH 03/12] This is a test to make sure new mono is being used with panda! --- BUILDING.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILDING.txt b/BUILDING.txt index 90a36fbded..e929cbf602 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -28,3 +28,5 @@ From the distribution type: Helpful resources: * http://opensimulator.org/wiki/Build_Instructions + + From 5d8205f170fc769f7cef62c615ab63874432a4cd Mon Sep 17 00:00:00 2001 From: nebadon Date: Mon, 7 Nov 2011 17:39:08 -0700 Subject: [PATCH 04/12] another panda test for good measure! --- BUILDING.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.txt b/BUILDING.txt index e929cbf602..c6db48c19c 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -29,4 +29,4 @@ From the distribution type: Helpful resources: * http://opensimulator.org/wiki/Build_Instructions - + From 554d2ddc03f76314bdef1b2af4e0dded90f8586d Mon Sep 17 00:00:00 2001 From: nebadon Date: Mon, 7 Nov 2011 17:49:05 -0700 Subject: [PATCH 05/12] another shot at making panda use mono 2.4.3!! --- BUILDING.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILDING.txt b/BUILDING.txt index c6db48c19c..475e8c2ae1 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -30,3 +30,4 @@ Helpful resources: * http://opensimulator.org/wiki/Build_Instructions + From 4f7fe58af8d3bafa2d29f46034eff9eb8baa8816 Mon Sep 17 00:00:00 2001 From: nebadon Date: Mon, 7 Nov 2011 18:15:21 -0700 Subject: [PATCH 06/12] yet another feeble attempt at understanding panda shmanda! --- BUILDING.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/BUILDING.txt b/BUILDING.txt index 475e8c2ae1..c6db48c19c 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -30,4 +30,3 @@ Helpful resources: * http://opensimulator.org/wiki/Build_Instructions - From d9b0d7e75289785307640a235984574d5a63ed8a Mon Sep 17 00:00:00 2001 From: nebadon Date: Mon, 7 Nov 2011 19:03:09 -0700 Subject: [PATCH 07/12] one final attempt and then im giving up on panda!!!!! --- BUILDING.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index c6db48c19c..90a36fbded 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -28,5 +28,3 @@ From the distribution type: Helpful resources: * http://opensimulator.org/wiki/Build_Instructions - - From 674b521fdd24f10964cc4f256486eca6fd6c2cc9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 9 Nov 2011 20:21:48 +0000 Subject: [PATCH 08/12] In pCampBot, don't try and pull down Primitive faces or sculpts set to null --- OpenSim/Tools/pCampBot/Bot.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 1b30766ef0..669c99b7f6 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -447,17 +447,20 @@ namespace pCampBot for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) { - UUID textureID = prim.Textures.FaceTextures[i].TextureID; + Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i]; - if (textureID != UUID.Zero) - GetTexture(textureID); + if (face != null) + { + UUID textureID = prim.Textures.FaceTextures[i].TextureID; + + if (textureID != UUID.Zero) + GetTexture(textureID); + } } } - if (prim.Sculpt.SculptTexture != UUID.Zero) - { + if (prim.Sculpt != null && prim.Sculpt.SculptTexture != UUID.Zero) GetTexture(prim.Sculpt.SculptTexture); - } } } From bbab7b6b4d1053d62037e7e05c37f9cb607db4da Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 9 Nov 2011 21:22:54 +0000 Subject: [PATCH 09/12] Use IsConnected status to determine whether all pCampBots have disconnected, rather than maintaining a separate count Checking IsConnected is more reliable. --- OpenSim/Tools/pCampBot/Bot.cs | 22 ++++++++++++++-------- OpenSim/Tools/pCampBot/BotManager.cs | 16 ++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 669c99b7f6..7f941a497f 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -222,7 +222,7 @@ namespace pCampBot } else { - MainConsole.Instance.OutputFormat( + m_log.ErrorFormat( "{0} {1} cannot login: {2}", FirstName, LastName, Client.Network.LoginMessage); if (OnDisconnected != null) @@ -266,12 +266,12 @@ namespace pCampBot } else { - MainConsole.Instance.Output(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID)); + m_log.WarnFormat("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID); } } catch (Exception e) { - MainConsole.Instance.Output(String.Format("Exception: {0}",e.ToString())); + m_log.ErrorFormat("Exception: {0}{1}", e.Message, e.StackTrace); } } } @@ -305,7 +305,7 @@ namespace pCampBot if (wear == "yes") { //TODO: Implement random outfit picking - MainConsole.Instance.Output("Picks a random outfit. Not yet implemented."); + m_log.DebugFormat("Picks a random outfit. Not yet implemented."); } else if (wear != "save") saveDir = "MyAppearance/" + wear; @@ -334,7 +334,9 @@ namespace pCampBot listwearables.Add(item); } else - MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name)); + { + m_log.WarnFormat("Failed to create item {0}", item.Name); + } } ); } @@ -356,7 +358,9 @@ namespace pCampBot listwearables.Add(item); } else - MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name)); + { + m_log.WarnFormat("Failed to create item {0}", item.Name); + } } ); } @@ -364,10 +368,12 @@ namespace pCampBot Thread.Sleep(1000); if (listwearables == null || listwearables.Count == 0) - MainConsole.Instance.Output("Nothing to send on this folder!"); + { + m_log.DebugFormat("Nothing to send on this folder!"); + } else { - MainConsole.Instance.Output(String.Format("Sending {0} wearables...",listwearables.Count)); + m_log.DebugFormat("Sending {0} wearables...", listwearables.Count); Client.Appearance.WearOutfit(listwearables, false); } } diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 704770a960..c4c6f8f9d9 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -51,7 +51,6 @@ namespace pCampBot protected CommandConsole m_console; protected List m_lBot; protected Random somthing = new Random(Environment.TickCount); - protected int numbots = 0; public IConfig Config { get; private set; } /// @@ -200,16 +199,17 @@ namespace pCampBot { case EventType.CONNECTED: m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected"); - numbots++; -// m_log.InfoFormat("NUMBOTS {0}", numbots); break; case EventType.DISCONNECTED: m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); - numbots--; -// m_log.InfoFormat("NUMBOTS {0}", numbots); - if (numbots <= 0) - Environment.Exit(0); - break; + + lock (m_lBot) + { + if (m_lBot.TrueForAll(b => !b.IsConnected)) + Environment.Exit(0); + + break; + } } } From 4f6915bad5940a52c18c8c77e2989b6030d921d7 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 9 Nov 2011 21:49:08 +0000 Subject: [PATCH 10/12] minor: Correct misleading method doc on SOG.UpdateRootRotation() --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 339cf0f13e..e3a564e5d7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2894,7 +2894,7 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Update the entire rotation of the group. + /// Update the rotation of just the root prim of a linkset. /// /// public void UpdateRootRotation(Quaternion rot) From 37583063eebb021784ce3b7d5aec75608c0cc27a Mon Sep 17 00:00:00 2001 From: GuduleLapointe Date: Fri, 28 Oct 2011 23:58:14 +0200 Subject: [PATCH 11/12] Allow custom setting for the console prompt Signed-off-by: BlueWall --- OpenSim/Region/Application/OpenSim.cs | 5 +++-- bin/OpenSim.ini.example | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 60c130f3a5..52b19eaafa 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -56,6 +56,7 @@ namespace OpenSim protected bool m_gui = false; protected string m_consoleType = "local"; protected uint m_consolePort = 0; + protected string m_custom_prompt; private string m_timedScript = "disabled"; private Timer m_scriptTimer; @@ -108,6 +109,7 @@ namespace OpenSim Util.FireAndForgetMethod = asyncCallMethod; stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); + m_custom_prompt = startupConfig.GetString("custom_prompt", "Region"); } if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) @@ -828,10 +830,9 @@ namespace OpenSim { MainConsole.Instance.Output("Usage: change region "); } - string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); - m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName); + m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName); m_console.ConsoleScene = m_sceneManager.CurrentScene; } diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index e71fb05e13..c5205dbeae 100755 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -230,6 +230,11 @@ ;; by scripts have changed. ; DeleteScriptsOnStartup = true + ;; Custom prompt + ;; This value replaces the word "Region" in console prompt + ;; (usualy "Region (regionName) # " + ;; Useful only if you have to monitor serveral servers + ; custom_prompt = "MyServer1" [SMTP] ;; The SMTP server enabled the email module to send email to external From ce4560bf8f040a5021446189193d66bc1d24d589 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Thu, 10 Nov 2011 07:26:16 -0500 Subject: [PATCH 12/12] Add GuduleLapointe to list of contributors Thanks for the patches! --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 7a25d3f129..961ab9fb04 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -83,6 +83,7 @@ what it is today. * Gerhard * Godfrey * Grumly57 +* GuduleLapointe * Ewe Loon * Fly-Man * Flyte Xevious