aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.UserServer
diff options
context:
space:
mode:
authorlbsa712007-03-27 08:10:15 +0000
committerlbsa712007-03-27 08:10:15 +0000
commita4fc6b5fbba7fd9a7b147b11a0d1c3ded1834d54 (patch)
tree560961306b9d80636d8ec976c05fcb8b54304f33 /OpenGridServices.UserServer
parentHeightfield needs fixing, or i'll re-implement it (probably actually the coll... (diff)
downloadopensim-SC_OLD-a4fc6b5fbba7fd9a7b147b11a0d1c3ded1834d54.zip
opensim-SC_OLD-a4fc6b5fbba7fd9a7b147b11a0d1c3ded1834d54.tar.gz
opensim-SC_OLD-a4fc6b5fbba7fd9a7b147b11a0d1c3ded1834d54.tar.bz2
opensim-SC_OLD-a4fc6b5fbba7fd9a7b147b11a0d1c3ded1834d54.tar.xz
* Now there's one Console class, and instead the apps responds to cmd's and show's
* Removed Golden Future TCP/SimChat options * Moved Ode.NET.dll to bin and changed prebuild accordingly (due to Prebuild limitations) * Normalized some namespaces * Added FxCop project * Added (temp disabled) Servers project (for great justice)
Diffstat (limited to '')
-rw-r--r--OpenGridServices.UserServer/ConsoleCmds.cs57
-rw-r--r--OpenGridServices.UserServer/Main.cs215
-rw-r--r--OpenGridServices.UserServer/OpenGridServices.UserServer.csproj6
-rw-r--r--OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build95
-rw-r--r--OpenGridServices.UserServer/UserHttp.cs11
5 files changed, 106 insertions, 278 deletions
diff --git a/OpenGridServices.UserServer/ConsoleCmds.cs b/OpenGridServices.UserServer/ConsoleCmds.cs
deleted file mode 100644
index f2568fc..0000000
--- a/OpenGridServices.UserServer/ConsoleCmds.cs
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Text;
32using ServerConsole;
33
34namespace OpenGridServices
35{
36
37 public class UserConsole : conscmd_callback {
38 public UserConsole() { }
39
40 public override void RunCmd(string cmd, string[] cmdparams) {
41 switch(cmd) {
42 case "help":
43 ServerConsole.MainConsole.Instance.WriteLine("shutdown - shutdown the user server (USE CAUTION!)"
44);
45 break;
46
47 case "shutdown":
48 ServerConsole.MainConsole.Instance.Close();
49 Environment.Exit(0);
50 break;
51 }
52 }
53
54 public override void Show(string ShowWhat) {
55 }
56 }
57}
diff --git a/OpenGridServices.UserServer/Main.cs b/OpenGridServices.UserServer/Main.cs
index d27f34e..c12e9d4 100644
--- a/OpenGridServices.UserServer/Main.cs
+++ b/OpenGridServices.UserServer/Main.cs
@@ -33,16 +33,16 @@ using System.Collections.Generic;
33using System.IO; 33using System.IO;
34using System.Text; 34using System.Text;
35using libsecondlife; 35using libsecondlife;
36using ServerConsole;
37using OpenSim.Framework.User; 36using OpenSim.Framework.User;
38using OpenSim.Framework.Sims; 37using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory; 38using OpenSim.Framework.Inventory;
39using OpenSim.Framework.Console;
40 40
41namespace OpenGridServices 41namespace OpenGridServices.UserServer
42{ 42{
43 /// <summary> 43 /// <summary>
44 /// </summary> 44 /// </summary>
45 public class OpenUser_Main 45 public class OpenUser_Main : conscmd_callback
46 { 46 {
47 47
48 public static OpenUser_Main userserver; 48 public static OpenUser_Main userserver;
@@ -57,32 +57,45 @@ namespace OpenGridServices
57 57
58 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>(); 58 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
59 59
60 ConsoleBase m_console;
61
60 [STAThread] 62 [STAThread]
61 public static void Main( string[] args ) 63 public static void Main( string[] args )
62 { 64 {
63 Console.WriteLine("Starting...\n"); 65 Console.WriteLine("Starting...\n");
64 ServerConsole.MainConsole.Instance = new MServerConsole(ServerConsole.ConsoleBase.ConsoleType.Local, "", 0, "opengrid-console.log", "OpenUser", new UserConsole());
65 66
66 userserver = new OpenUser_Main(); 67 userserver = new OpenUser_Main();
67 userserver.Startup(); 68 userserver.Startup();
68 69
69 ServerConsole.MainConsole.Instance.WriteLine("\nEnter help for a list of commands\n"); 70 userserver.Work();
70
71 while(true) {
72 ServerConsole.MainConsole.Instance.MainConsolePrompt();
73 }
74 } 71 }
72
73 private OpenUser_Main()
74 {
75 m_console = new ConsoleBase("opengrid-console.log", "OpenUser", this);
76 MainConsole.Instance = m_console;
77 }
75 78
79 private void Work()
80 {
81 m_console.WriteLine("\nEnter help for a list of commands\n");
82
83 while (true)
84 {
85 m_console.MainConsolePrompt();
86 }
87 }
88
76 public void Startup() { 89 public void Startup() {
77 ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Please press enter to retain default settings"); 90 MainConsole.Instance.WriteLine("Main.cs:Startup() - Please press enter to retain default settings");
78 91
79 this.GridURL=ServerConsole.MainConsole.Instance.CmdPrompt("Grid URL: "); 92 this.GridURL=MainConsole.Instance.CmdPrompt("Grid URL: ");
80 this.GridSendKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to send to grid: "); 93 this.GridSendKey=MainConsole.Instance.CmdPrompt("Key to send to grid: ");
81 this.GridRecvKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to expect from grid: "); 94 this.GridRecvKey=MainConsole.Instance.CmdPrompt("Key to expect from grid: ");
82 95
83 this.DefaultStartupMsg=ServerConsole.MainConsole.Instance.CmdPrompt("Default startup message for clients [Welcome to OGS!] :","Welcome to OGS!"); 96 this.DefaultStartupMsg=MainConsole.Instance.CmdPrompt("Default startup message for clients [Welcome to OGS!] :","Welcome to OGS!");
84 97
85 ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager"); 98 MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager");
86 _profilemanager = new UserProfileManager(); 99 _profilemanager = new UserProfileManager();
87 _profilemanager.InitUserProfiles(); 100 _profilemanager.InitUserProfiles();
88 _profilemanager.SetKeys(GridSendKey, GridRecvKey, GridURL, DefaultStartupMsg); 101 _profilemanager.SetKeys(GridSendKey, GridRecvKey, GridURL, DefaultStartupMsg);
@@ -91,10 +104,10 @@ namespace OpenGridServices
91 string tempfirstname; 104 string tempfirstname;
92 string templastname; 105 string templastname;
93 string tempMD5Passwd; 106 string tempMD5Passwd;
94 ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Please configure the grid god user:"); 107 MainConsole.Instance.WriteLine("Main.cs:Startup() - Please configure the grid god user:");
95 tempfirstname=ServerConsole.MainConsole.Instance.CmdPrompt("First name: "); 108 tempfirstname=MainConsole.Instance.CmdPrompt("First name: ");
96 templastname=ServerConsole.MainConsole.Instance.CmdPrompt("Last name: "); 109 templastname=MainConsole.Instance.CmdPrompt("Last name: ");
97 tempMD5Passwd=ServerConsole.MainConsole.Instance.PasswdPrompt("Password: "); 110 tempMD5Passwd=MainConsole.Instance.PasswdPrompt("Password: ");
98 111
99 System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider(); 112 System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
100 byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd); 113 byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
@@ -111,149 +124,27 @@ namespace OpenGridServices
111 GridGod.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f); 124 GridGod.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
112 GridGod.homepos = new LLVector3(128f,128f,23f); 125 GridGod.homepos = new LLVector3(128f,128f,23f);
113 126
114 ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process"); 127 MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process");
115 _httpd = new UserHTTPServer(); 128 _httpd = new UserHTTPServer();
116 }
117 }
118
119 public class MServerConsole : ConsoleBase
120 {
121
122 private ConsoleType ConsType;
123 StreamWriter Log;
124 public conscmd_callback cmdparser;
125 public string componentname;
126
127 // STUPID HACK ALERT!!!! STUPID HACK ALERT!!!!!
128 // constype - the type of console to use (see enum ConsoleType)
129 // sparam - depending on the console type:
130 // TCP - the IP to bind to (127.0.0.1 if blank)
131 // Local - param ignored
132 // and for the iparam:
133 // TCP - the port to bind to
134 // Local - param ignored
135 // LogFile - duh
136 // componentname - which component of the OGS system? (user, asset etc)
137 // cmdparser - a reference to a conscmd_callback object
138
139 public MServerConsole(ConsoleType constype, string sparam, int iparam, string LogFile, string componentname, conscmd_callback cmdparser) {
140 ConsType = constype;
141 this.componentname = componentname;
142 this.cmdparser = cmdparser;
143 switch(constype) {
144 case ConsoleType.Local:
145 Console.WriteLine("ServerConsole.cs - creating new local console");
146 Console.WriteLine("Logs will be saved to current directory in " + LogFile);
147 Log=File.AppendText(LogFile);
148 Log.WriteLine("========================================================================");
149 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
150 break;
151
152 case ConsoleType.TCP:
153 break;
154
155 default:
156 Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!");
157 break;
158 }
159 }
160
161 public override void Close() {
162 Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
163 Log.Close();
164 }
165
166 // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here
167 public override void WriteLine(string Line) {
168 Log.WriteLine(Line);
169 Console.WriteLine(Line);
170 return;
171 }
172
173 public override string ReadLine() {
174 string TempStr=Console.ReadLine();
175 Log.WriteLine(TempStr);
176 return TempStr;
177 }
178
179 public override int Read() {
180 int TempInt= Console.Read();
181 Log.Write((char)TempInt);
182 return TempInt;
183 }
184
185 public override void Write(string Line) {
186 Console.Write(Line);
187 Log.Write(Line);
188 return;
189 }
190
191
192 // Displays a prompt and waits for the user to enter a string, then returns that string
193 // Done with no echo and suitable for passwords
194 public override string PasswdPrompt(string prompt) {
195 // FIXME: Needs to be better abstracted
196 Log.WriteLine(prompt);
197 this.Write(prompt);
198 ConsoleColor oldfg=Console.ForegroundColor;
199 Console.ForegroundColor=Console.BackgroundColor;
200 string temp=Console.ReadLine();
201 Console.ForegroundColor=oldfg;
202 return temp;
203 }
204
205 // Displays a command prompt and waits for the user to enter a string, then returns that string
206 public override string CmdPrompt(string prompt) {
207 this.Write(prompt);
208 return this.ReadLine();
209 }
210
211 // Displays a command prompt and returns a default value if the user simply presses enter
212 public override string CmdPrompt(string prompt, string defaultresponse) {
213 string temp=CmdPrompt(prompt);
214 if(temp=="") {
215 return defaultresponse;
216 } else {
217 return temp;
218 }
219 }
220
221 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
222 public override string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB) {
223 bool itisdone=false;
224 string temp=CmdPrompt(prompt,defaultresponse);
225 while(itisdone==false) {
226 if((temp==OptionA) || (temp==OptionB)) {
227 itisdone=true;
228 } else {
229 this.WriteLine("Valid options are " + OptionA + " or " + OptionB);
230 temp=CmdPrompt(prompt,defaultresponse);
231 }
232 }
233 return temp;
234 }
235
236 // Runs a command with a number of parameters
237 public override Object RunCmd(string Cmd, string[] cmdparams) {
238 cmdparser.RunCmd(Cmd, cmdparams);
239 return null;
240 }
241
242 // Shows data about something
243 public override void ShowCommands(string ShowWhat) {
244 cmdparser.Show(ShowWhat);
245 } 129 }
246 130
247 public override void MainConsolePrompt() { 131 public void RunCmd(string cmd, string[] cmdparams)
248 string[] tempstrarray; 132 {
249 string tempstr = this.CmdPrompt(this.componentname + "# "); 133 switch (cmd)
250 tempstrarray = tempstr.Split(' '); 134 {
251 string cmd=tempstrarray[0]; 135 case "help":
252 Array.Reverse(tempstrarray); 136 m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
253 Array.Resize<string>(ref tempstrarray,tempstrarray.Length-1); 137 break;
254 Array.Reverse(tempstrarray); 138
255 string[] cmdparams=(string[])tempstrarray; 139 case "shutdown":
256 RunCmd(cmd,cmdparams); 140 m_console.Close();
257 } 141 Environment.Exit(0);
142 break;
143 }
144 }
145
146 public void Show(string ShowWhat)
147 {
148 }
258 } 149 }
259} 150}
diff --git a/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
index 7ffd949..b0c0407 100644
--- a/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
+++ b/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
@@ -3,7 +3,7 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{3FE545CA-1179-42DF-BDF1-F14DEA463A21}</ProjectGuid> 6 <ProjectGuid>{36895293-A627-42EC-BA77-6AF6F5A4A7DF}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
@@ -78,10 +78,6 @@
78 <HintPath>..\bin\OpenSim.Framework.Console.dll</HintPath> 78 <HintPath>..\bin\OpenSim.Framework.Console.dll</HintPath>
79 <Private>False</Private> 79 <Private>False</Private>
80 </Reference> 80 </Reference>
81 <Reference Include="OpenGridServices.ServerConsole.dll" >
82 <HintPath>..\bin\OpenGridServices.ServerConsole.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="libsecondlife.dll" > 81 <Reference Include="libsecondlife.dll" >
86 <HintPath>..\bin\libsecondlife.dll</HintPath> 82 <HintPath>..\bin\libsecondlife.dll</HintPath>
87 <Private>False</Private> 83 <Private>False</Private>
diff --git a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
index 710b01b..f1c6180 100644
--- a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
+++ b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
@@ -1,48 +1,47 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenGridServices.UserServer" default="build"> 2<project name="OpenGridServices.UserServer" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}"> 6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}"> 7 <fileset basedir="${project::get-base-directory()}">
8 </fileset> 8 </fileset>
9 </copy> 9 </copy>
10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> 10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenGridServices.UserServer" dynamicprefix="true" > 11 <resources prefix="OpenGridServices.UserServer" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="ConsoleCmds.cs" /> 14 <include name="ConsoleCmds.cs" />
15 <include name="Main.cs" /> 15 <include name="Main.cs" />
16 <include name="UserHttp.cs" /> 16 <include name="UserHttp.cs" />
17 <include name="Properties/AssemblyInfo.cs" /> 17 <include name="Properties/AssemblyInfo.cs" />
18 </sources> 18 </sources>
19 <references basedir="${project::get-base-directory()}"> 19 <references basedir="${project::get-base-directory()}">
20 <lib> 20 <lib>
21 <include name="${project::get-base-directory()}" /> 21 <include name="${project::get-base-directory()}" />
22 <include name="${project::get-base-directory()}/${build.dir}" /> 22 <include name="${project::get-base-directory()}/${build.dir}" />
23 </lib> 23 </lib>
24 <include name="System.dll" /> 24 <include name="System.dll" />
25 <include name="System.Data.dll" /> 25 <include name="System.Data.dll" />
26 <include name="System.Xml.dll" /> 26 <include name="System.Xml.dll" />
27 <include name="../bin/OpenSim.Framework.dll" /> 27 <include name="../bin/OpenSim.Framework.dll" />
28 <include name="../bin/OpenSim.Framework.Console.dll" /> 28 <include name="../bin/OpenSim.Framework.Console.dll" />
29 <include name="../bin/OpenGridServices.ServerConsole.dll" /> 29 <include name="../bin/libsecondlife.dll" />
30 <include name="../bin/libsecondlife.dll" /> 30 </references>
31 </references> 31 </csc>
32 </csc> 32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
33 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> 33 <mkdir dir="${project::get-base-directory()}/../bin/"/>
34 <mkdir dir="${project::get-base-directory()}/../bin/"/> 34 <copy todir="${project::get-base-directory()}/../bin/">
35 <copy todir="${project::get-base-directory()}/../bin/"> 35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 36 <include name="*.dll"/>
37 <include name="*.dll"/> 37 <include name="*.exe"/>
38 <include name="*.exe"/> 38 </fileset>
39 </fileset> 39 </copy>
40 </copy> 40 </target>
41 </target> 41 <target name="clean">
42 <target name="clean"> 42 <delete dir="${bin.dir}" failonerror="false" />
43 <delete dir="${bin.dir}" failonerror="false" /> 43 <delete dir="${obj.dir}" failonerror="false" />
44 <delete dir="${obj.dir}" failonerror="false" /> 44 </target>
45 </target> 45 <target name="doc" description="Creates documentation.">
46 <target name="doc" description="Creates documentation."> 46 </target>
47 </target> 47</project>
48</project>
diff --git a/OpenGridServices.UserServer/UserHttp.cs b/OpenGridServices.UserServer/UserHttp.cs
index ce3cfcd..4dc2358 100644
--- a/OpenGridServices.UserServer/UserHttp.cs
+++ b/OpenGridServices.UserServer/UserHttp.cs
@@ -37,25 +37,25 @@ using System.IO;
37using System.Collections; 37using System.Collections;
38using System.Collections.Generic; 38using System.Collections.Generic;
39using libsecondlife; 39using libsecondlife;
40using ServerConsole;
41using OpenSim.Framework.User; 40using OpenSim.Framework.User;
42using OpenSim.Framework.Sims; 41using OpenSim.Framework.Sims;
43using OpenSim.Framework.Inventory; 42using OpenSim.Framework.Inventory;
43using OpenSim.Framework.Console;
44 44
45namespace OpenGridServices 45namespace OpenGridServices.UserServer
46{ 46{
47 public class UserHTTPServer { 47 public class UserHTTPServer {
48 public Thread HTTPD; 48 public Thread HTTPD;
49 public HttpListener Listener; 49 public HttpListener Listener;
50 50
51 public UserHTTPServer() { 51 public UserHTTPServer() {
52 ServerConsole.MainConsole.Instance.WriteLine("Starting up HTTP Server"); 52 MainConsole.Instance.WriteLine("Starting up HTTP Server");
53 HTTPD = new Thread(new ThreadStart(StartHTTP)); 53 HTTPD = new Thread(new ThreadStart(StartHTTP));
54 HTTPD.Start(); 54 HTTPD.Start();
55 } 55 }
56 56
57 public void StartHTTP() { 57 public void StartHTTP() {
58 ServerConsole.MainConsole.Instance.WriteLine("UserHttp.cs:StartHTTP() - Spawned main thread OK"); 58 MainConsole.Instance.WriteLine("UserHttp.cs:StartHTTP() - Spawned main thread OK");
59 Listener = new HttpListener(); 59 Listener = new HttpListener();
60 60
61 Listener.Prefixes.Add("http://+:8002/userserver/"); 61 Listener.Prefixes.Add("http://+:8002/userserver/");
@@ -70,7 +70,7 @@ namespace OpenGridServices
70 } 70 }
71 71
72 static string ParseXMLRPC(string requestBody) { 72 static string ParseXMLRPC(string requestBody) {
73 return OpenGridServices.OpenUser_Main.userserver._profilemanager.ParseXMLRPC(requestBody); 73 return OpenUser_Main.userserver._profilemanager.ParseXMLRPC(requestBody);
74 } 74 }
75 75
76 static string ParseREST(HttpListenerRequest www_req) { 76 static string ParseREST(HttpListenerRequest www_req) {
@@ -93,7 +93,6 @@ namespace OpenGridServices
93 93
94 } 94 }
95 return "OK"; 95 return "OK";
96 break;
97 } 96 }
98 97
99 return ""; 98 return "";