aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs27
1 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 492f67f..779a72b 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -27,28 +27,23 @@
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic;
31using System.IO; 30using System.IO;
32using System.Reflection; 31using OpenSim.Framework;
33using libsecondlife;
34using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
37using OpenSim.Framework;
38using OpenSim.Framework;
39 34
40namespace OpenSim.Grid.UserServer 35namespace OpenSim.Grid.UserServer
41{ 36{
42 /// <summary> 37 /// <summary>
43 /// </summary> 38 /// </summary>
44 public class OpenUser_Main : conscmd_callback 39 public class OpenUser_Main : conscmd_callback
45 { 40 {
46 private UserConfig Cfg; 41 private UserConfig Cfg;
47 42
48 public UserManager m_userManager; 43 public UserManager m_userManager;
49 public UserLoginService m_loginService; 44 public UserLoginService m_loginService;
50 45
51 LogBase m_console; 46 private LogBase m_console;
52 47
53 [STAThread] 48 [STAThread]
54 public static void Main(string[] args) 49 public static void Main(string[] args)
@@ -67,7 +62,8 @@ namespace OpenSim.Grid.UserServer
67 { 62 {
68 Directory.CreateDirectory(Util.logDir()); 63 Directory.CreateDirectory(Util.logDir());
69 } 64 }
70 m_console = new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); 65 m_console =
66 new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true);
71 MainLog.Instance = m_console; 67 MainLog.Instance = m_console;
72 } 68 }
73 69
@@ -83,7 +79,7 @@ namespace OpenSim.Grid.UserServer
83 79
84 public void Startup() 80 public void Startup()
85 { 81 {
86 this.Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); 82 Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml")));
87 83
88 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); 84 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection");
89 m_userManager = new UserManager(); 85 m_userManager = new UserManager();
@@ -93,15 +89,16 @@ namespace OpenSim.Grid.UserServer
93 m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg); 89 m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg);
94 90
95 MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); 91 MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
96 BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); 92 BaseHttpServer httpServer = new BaseHttpServer((int) Cfg.HttpPort);
97 93
98 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 94 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
99 95
100 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); 96 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
101 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); 97 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID);
102 98
103 httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod )); 99 httpServer.AddStreamHandler(
104 100 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
101
105 httpServer.Start(); 102 httpServer.Start();
106 m_console.Status("SERVER", "Userserver 0.4 - Startup complete"); 103 m_console.Status("SERVER", "Userserver 0.4 - Startup complete");
107 } 104 }
@@ -126,7 +123,7 @@ namespace OpenSim.Grid.UserServer
126 123
127 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); 124 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
128 125
129 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 126 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
130 break; 127 break;
131 } 128 }
132 } 129 }
@@ -178,4 +175,4 @@ namespace OpenSim.Grid.UserServer
178 { 175 {
179 } 176 }
180 } 177 }
181} 178} \ No newline at end of file