diff options
author | Jeff Ames | 2008-03-18 15:30:38 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-18 15:30:38 +0000 |
commit | e5b91442822df211f9f8277aaf0c40e1339810f3 (patch) | |
tree | 116ac977981e7bea0b7dd4c8f9cbad87e02c5b65 /OpenSim/Region/Application | |
parent | * Applying Mantis Patch #518.2 - State not persisted in MySQL DataStore (diff) | |
download | opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.zip opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.gz opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.bz2 opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 97 |
1 files changed, 51 insertions, 46 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e8490dc..e50187e 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -455,7 +455,7 @@ namespace OpenSim | |||
455 | 455 | ||
456 | // set initial ServerURI | 456 | // set initial ServerURI |
457 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName | 457 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName |
458 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); | 458 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); |
459 | 459 | ||
460 | if ((proxyUrl.Length > 0) && (portadd_flag)) | 460 | if ((proxyUrl.Length > 0) && (portadd_flag)) |
461 | { | 461 | { |
@@ -616,7 +616,7 @@ namespace OpenSim | |||
616 | public virtual void Shutdown() | 616 | public virtual void Shutdown() |
617 | { | 617 | { |
618 | ProxyCommand(proxyUrl, "Stop"); | 618 | ProxyCommand(proxyUrl, "Stop"); |
619 | 619 | ||
620 | if (m_startupCommandsFile != String.Empty) | 620 | if (m_startupCommandsFile != String.Empty) |
621 | { | 621 | { |
622 | RunCommandScript(m_shutdownCommandsFile); | 622 | RunCommandScript(m_shutdownCommandsFile); |
@@ -632,7 +632,7 @@ namespace OpenSim | |||
632 | 632 | ||
633 | m_console.Close(); | 633 | m_console.Close(); |
634 | Environment.Exit(0); | 634 | Environment.Exit(0); |
635 | } | 635 | } |
636 | 636 | ||
637 | private void RunAutoTimerScript(object sender, EventArgs e) | 637 | private void RunAutoTimerScript(object sender, EventArgs e) |
638 | { | 638 | { |
@@ -722,17 +722,23 @@ namespace OpenSim | |||
722 | } | 722 | } |
723 | break; | 723 | break; |
724 | 724 | ||
725 | case "scene-debug": | 725 | case "scene-debug": |
726 | if (cmdparams.Length == 3) { | 726 | if (cmdparams.Length == 3) |
727 | if (m_sceneManager.CurrentScene == null) { | 727 | { |
728 | m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first"); | 728 | if (m_sceneManager.CurrentScene == null) |
729 | } else { | 729 | { |
730 | m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); | 730 | m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first"); |
731 | } | 731 | } |
732 | } else { | 732 | else |
733 | m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)"); | 733 | { |
734 | } | 734 | m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); |
735 | break; | 735 | } |
736 | } | ||
737 | else | ||
738 | { | ||
739 | m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)"); | ||
740 | } | ||
741 | break; | ||
736 | 742 | ||
737 | case "help": | 743 | case "help": |
738 | m_console.Notice("alert - send alert to a designated user or all users."); | 744 | m_console.Notice("alert - send alert to a designated user or all users."); |
@@ -772,15 +778,15 @@ namespace OpenSim | |||
772 | break; | 778 | break; |
773 | 779 | ||
774 | case "threads": | 780 | case "threads": |
775 | //m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); | 781 | // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); |
776 | //int _tc = 0; | 782 | // int _tc = 0; |
777 | 783 | ||
778 | //foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) | 784 | // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) |
779 | //{ | 785 | // { |
780 | // _tc++; | 786 | // _tc++; |
781 | // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); | 787 | // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); |
782 | 788 | // } | |
783 | //} | 789 | |
784 | List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads(); | 790 | List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads(); |
785 | if (threads == null) | 791 | if (threads == null) |
786 | { | 792 | { |
@@ -797,7 +803,6 @@ namespace OpenSim | |||
797 | } | 803 | } |
798 | } | 804 | } |
799 | 805 | ||
800 | |||
801 | break; | 806 | break; |
802 | case "save-xml": | 807 | case "save-xml": |
803 | if (cmdparams.Length > 0) | 808 | if (cmdparams.Length > 0) |
@@ -833,7 +838,7 @@ namespace OpenSim | |||
833 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); | 838 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); |
834 | } | 839 | } |
835 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + | 840 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + |
836 | loadOffset.Z + ">"); | 841 | loadOffset.Z + ">"); |
837 | } | 842 | } |
838 | } | 843 | } |
839 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); | 844 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
@@ -1158,11 +1163,11 @@ namespace OpenSim | |||
1158 | case "regions": | 1163 | case "regions": |
1159 | m_sceneManager.ForEachScene( | 1164 | m_sceneManager.ForEachScene( |
1160 | delegate(Scene scene) | 1165 | delegate(Scene scene) |
1161 | { | 1166 | { |
1162 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + | 1167 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + |
1163 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + | 1168 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + |
1164 | scene.RegionInfo.RegionLocY); | 1169 | scene.RegionInfo.RegionLocY); |
1165 | }); | 1170 | }); |
1166 | break; | 1171 | break; |
1167 | 1172 | ||
1168 | case "stats": | 1173 | case "stats": |
@@ -1191,7 +1196,8 @@ namespace OpenSim | |||
1191 | } | 1196 | } |
1192 | 1197 | ||
1193 | #endregion | 1198 | #endregion |
1194 | // TODO: remove me!! (almost same as XmlRpcCommand) | 1199 | |
1200 | // TODO: remove me!! (almost same as XmlRpcCommand) | ||
1195 | public object ProxyCommand(string url, string methodName, params object[] args) | 1201 | public object ProxyCommand(string url, string methodName, params object[] args) |
1196 | { | 1202 | { |
1197 | if(proxyUrl.Length==0) return null; | 1203 | if(proxyUrl.Length==0) return null; |
@@ -1230,34 +1236,33 @@ namespace OpenSim | |||
1230 | /// <param name="starttime">The first out parameter describing when the Region server started</param> | 1236 | /// <param name="starttime">The first out parameter describing when the Region server started</param> |
1231 | /// <param name="uptime">The second out parameter describing how long the Region server has run</param> | 1237 | /// <param name="uptime">The second out parameter describing how long the Region server has run</param> |
1232 | public void GetRunTime(out string starttime, out string uptime) | 1238 | public void GetRunTime(out string starttime, out string uptime) |
1233 | { | 1239 | { |
1234 | starttime = m_startuptime.ToString(); | 1240 | starttime = m_startuptime.ToString(); |
1235 | uptime = (DateTime.Now - m_startuptime).ToString(); | 1241 | uptime = (DateTime.Now - m_startuptime).ToString(); |
1236 | } | 1242 | } |
1237 | 1243 | ||
1238 | /// <summary> | 1244 | /// <summary> |
1239 | /// Get the number of the avatars in the Region server | 1245 | /// Get the number of the avatars in the Region server |
1240 | /// </summary> | 1246 | /// </summary> |
1241 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> | 1247 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> |
1242 | public void GetAvatarNumber(out int usernum) | 1248 | public void GetAvatarNumber(out int usernum) |
1243 | { | 1249 | { |
1244 | usernum = m_sceneManager.GetCurrentSceneAvatars().Count; | 1250 | usernum = m_sceneManager.GetCurrentSceneAvatars().Count; |
1245 | } | 1251 | } |
1246 | 1252 | ||
1247 | /// <summary> | 1253 | /// <summary> |
1248 | /// Get the number of the avatars in the Region server | 1254 | /// Get the number of the avatars in the Region server |
1249 | /// </summary> | 1255 | /// </summary> |
1250 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> | 1256 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> |
1251 | public void GetRegionNumber(out int regionnum) | 1257 | public void GetRegionNumber(out int regionnum) |
1252 | { | 1258 | { |
1253 | int accounter = 0; | 1259 | int accounter = 0; |
1254 | //List<string> regionNameList = new List<string>(); | 1260 | //List<string> regionNameList = new List<string>(); |
1255 | |||
1256 | m_sceneManager.ForEachScene(delegate(Scene scene) { | ||
1257 | accounter++; | ||
1258 | }); | ||
1259 | regionnum = accounter; | ||
1260 | 1261 | ||
1261 | } | 1262 | m_sceneManager.ForEachScene(delegate(Scene scene) { |
1263 | accounter++; | ||
1264 | }); | ||
1265 | regionnum = accounter; | ||
1266 | } | ||
1262 | } | 1267 | } |
1263 | } | 1268 | } |