aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2009-08-17 09:21:39 +0100
committerMelanie2009-08-17 09:21:39 +0100
commit3d7bb7567c7452d4a1216db5656d0b02957cf950 (patch)
tree5fe5b003a1ba140e1a5cb4cfda32d8569c3fee5e
parentLimit the scrollback buffer output of the command line client to (diff)
downloadopensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.zip
opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.gz
opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.bz2
opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.xz
Add the ability to use -console=rest to the region server. User
and pass are specified the same way as for the ROBUST server
Diffstat (limited to '')
-rw-r--r--OpenSim/ConsoleClient/ConsoleClient.cs2
-rw-r--r--OpenSim/Region/Application/Application.cs3
-rw-r--r--OpenSim/Region/Application/OpenSim.cs26
-rw-r--r--bin/OpenSim.ConsoleClient.exe.config2
-rw-r--r--bin/OpenSim.ini.example2
5 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs
index 1e5f0b7..319584f 100644
--- a/OpenSim/ConsoleClient/ConsoleClient.cs
+++ b/OpenSim/ConsoleClient/ConsoleClient.cs
@@ -185,7 +185,7 @@ namespace OpenSim.ConsoleClient
185 if (parts.Length != 3) 185 if (parts.Length != 3)
186 continue; 186 continue;
187 187
188 MainConsole.Instance.Output(parts[2], parts[1]); 188 MainConsole.Instance.Output(parts[2].Trim(), parts[1]);
189 } 189 }
190 190
191 Requester.MakeRequest(requestUrl, requestData, ReadResponses); 191 Requester.MakeRequest(requestUrl, requestData, ReadResponses);
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index df80290..2fd26bf 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -120,6 +120,7 @@ namespace OpenSim
120 configSource.AddSwitch("Startup", "gridmode"); 120 configSource.AddSwitch("Startup", "gridmode");
121 configSource.AddSwitch("Startup", "physics"); 121 configSource.AddSwitch("Startup", "physics");
122 configSource.AddSwitch("Startup", "gui"); 122 configSource.AddSwitch("Startup", "gui");
123 configSource.AddSwitch("Startup", "console");
123 124
124 configSource.AddConfig("StandAlone"); 125 configSource.AddConfig("StandAlone");
125 configSource.AddConfig("Network"); 126 configSource.AddConfig("Network");
@@ -223,4 +224,4 @@ namespace OpenSim
223 _IsHandlingException = false; 224 _IsHandlingException = false;
224 } 225 }
225 } 226 }
226} \ No newline at end of file 227}
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 390cfcd..38874f9 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -52,6 +52,7 @@ namespace OpenSim
52 protected string m_startupCommandsFile; 52 protected string m_startupCommandsFile;
53 protected string m_shutdownCommandsFile; 53 protected string m_shutdownCommandsFile;
54 protected bool m_gui = false; 54 protected bool m_gui = false;
55 protected string m_consoleType = "local";
55 56
56 private string m_timedScript = "disabled"; 57 private string m_timedScript = "disabled";
57 private Timer m_scriptTimer; 58 private Timer m_scriptTimer;
@@ -71,7 +72,10 @@ namespace OpenSim
71 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt"); 72 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt");
72 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "shutdown_commands.txt"); 73 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "shutdown_commands.txt");
73 74
74 m_gui = startupConfig.GetBoolean("gui", false); 75 if (startupConfig.GetString("console", String.Empty) == String.Empty)
76 m_gui = startupConfig.GetBoolean("gui", false);
77 else
78 m_consoleType= startupConfig.GetString("console", String.Empty);
75 79
76 m_timedScript = startupConfig.GetString("timer_Script", "disabled"); 80 m_timedScript = startupConfig.GetString("timer_Script", "disabled");
77 if (m_logFileAppender != null) 81 if (m_logFileAppender != null)
@@ -110,13 +114,31 @@ namespace OpenSim
110 if (m_gui) // Driven by external GUI 114 if (m_gui) // Driven by external GUI
111 m_console = new CommandConsole("Region"); 115 m_console = new CommandConsole("Region");
112 else 116 else
113 m_console = new LocalConsole("Region"); 117 {
118 switch (m_consoleType)
119 {
120 case "basic":
121 m_console = new CommandConsole("Region");
122 break;
123 case "rest":
124 m_console = new RemoteConsole("Region");
125 ((RemoteConsole)m_console).ReadConfig(m_config.Source);
126 break;
127 default:
128 m_console = new LocalConsole("Region");
129 break;
130 }
131 }
132
114 MainConsole.Instance = m_console; 133 MainConsole.Instance = m_console;
115 134
116 RegisterConsoleCommands(); 135 RegisterConsoleCommands();
117 136
118 base.StartupSpecific(); 137 base.StartupSpecific();
119 138
139 if (m_console is RemoteConsole)
140 ((RemoteConsole)m_console).SetServer(m_httpServer);
141
120 //Run Startup Commands 142 //Run Startup Commands
121 if (String.IsNullOrEmpty(m_startupCommandsFile)) 143 if (String.IsNullOrEmpty(m_startupCommandsFile))
122 { 144 {
diff --git a/bin/OpenSim.ConsoleClient.exe.config b/bin/OpenSim.ConsoleClient.exe.config
index c2d93c0..7aa974c 100644
--- a/bin/OpenSim.ConsoleClient.exe.config
+++ b/bin/OpenSim.ConsoleClient.exe.config
@@ -17,7 +17,7 @@
17 </appender> 17 </appender>
18 18
19 <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> 19 <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
20 <file value="OpenSim.log" /> 20 <file value="OpenSim.ConsoleClient.log" />
21 <appendToFile value="true" /> 21 <appendToFile value="true" />
22 <layout type="log4net.Layout.PatternLayout"> 22 <layout type="log4net.Layout.PatternLayout">
23 <conversionPattern value="%date %-5level - %logger %message%newline" /> 23 <conversionPattern value="%date %-5level - %logger %message%newline" />
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index db993b4..a1532c5 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -292,6 +292,8 @@
292 LibrariesXMLFile="./inventory/Libraries.xml" 292 LibrariesXMLFile="./inventory/Libraries.xml"
293 293
294[Network] 294[Network]
295 ConsoleUser = "Test"
296 ConsolePass = "secret"
295 http_listener_port = 9000 297 http_listener_port = 9000
296 default_location_x = 1000 298 default_location_x = 1000
297 default_location_y = 1000 299 default_location_y = 1000