diff options
Diffstat (limited to 'OpenSim/Grid/MessagingServer')
-rw-r--r-- | OpenSim/Grid/MessagingServer/Main.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index a7c3a2a..3d5ceb4 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -39,14 +39,13 @@ namespace OpenSim.Grid.MessagingServer | |||
39 | { | 39 | { |
40 | /// <summary> | 40 | /// <summary> |
41 | /// </summary> | 41 | /// </summary> |
42 | public class OpenMessage_Main : conscmd_callback | 42 | public class OpenMessage_Main : BaseOpenSimServer, conscmd_callback |
43 | { | 43 | { |
44 | private MessageServerConfig Cfg; | 44 | private MessageServerConfig Cfg; |
45 | 45 | ||
46 | //public UserManager m_userManager; | 46 | //public UserManager m_userManager; |
47 | //public UserLoginService m_loginService; | 47 | //public UserLoginService m_loginService; |
48 | 48 | ||
49 | private LogBase m_console; | ||
50 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 49 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
51 | 50 | ||
52 | [STAThread] | 51 | [STAThread] |
@@ -66,18 +65,18 @@ namespace OpenSim.Grid.MessagingServer | |||
66 | { | 65 | { |
67 | Directory.CreateDirectory(Util.logDir()); | 66 | Directory.CreateDirectory(Util.logDir()); |
68 | } | 67 | } |
69 | m_console = | 68 | m_log = |
70 | new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true); | 69 | new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true); |
71 | MainLog.Instance = m_console; | 70 | MainLog.Instance = m_log; |
72 | } | 71 | } |
73 | 72 | ||
74 | private void Work() | 73 | private void Work() |
75 | { | 74 | { |
76 | m_console.Notice("Enter help for a list of commands\n"); | 75 | m_log.Notice("Enter help for a list of commands\n"); |
77 | 76 | ||
78 | while (true) | 77 | while (true) |
79 | { | 78 | { |
80 | m_console.MainLogPrompt(); | 79 | m_log.MainLogPrompt(); |
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
@@ -105,7 +104,7 @@ namespace OpenSim.Grid.MessagingServer | |||
105 | //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 104 | //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
106 | 105 | ||
107 | httpServer.Start(); | 106 | httpServer.Start(); |
108 | m_console.Status("SERVER", "Messageserver 0.4 - Startup complete"); | 107 | m_log.Status("SERVER", "Messageserver 0.4 - Startup complete"); |
109 | } | 108 | } |
110 | 109 | ||
111 | 110 | ||
@@ -121,7 +120,7 @@ namespace OpenSim.Grid.MessagingServer | |||
121 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 120 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
122 | } catch (Exception ex) | 121 | } catch (Exception ex) |
123 | { | 122 | { |
124 | m_console.Error("SERVER", "Error creating user: {0}", ex.ToString()); | 123 | m_log.Error("SERVER", "Error creating user: {0}", ex.ToString()); |
125 | } | 124 | } |
126 | 125 | ||
127 | try | 126 | try |
@@ -131,23 +130,25 @@ namespace OpenSim.Grid.MessagingServer | |||
131 | } | 130 | } |
132 | catch (Exception ex) | 131 | catch (Exception ex) |
133 | { | 132 | { |
134 | m_console.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); | 133 | m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); |
135 | } | 134 | } |
136 | // m_lastCreatedUser = userID; | 135 | // m_lastCreatedUser = userID; |
137 | break; | 136 | break; |
138 | } | 137 | } |
139 | } | 138 | } |
140 | 139 | ||
141 | public void RunCmd(string cmd, string[] cmdparams) | 140 | public override void RunCmd(string cmd, string[] cmdparams) |
142 | { | 141 | { |
142 | base.RunCmd(cmd, cmdparams); | ||
143 | |||
143 | switch (cmd) | 144 | switch (cmd) |
144 | { | 145 | { |
145 | case "help": | 146 | case "help": |
146 | m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)"); | 147 | m_log.Notice("shutdown - shutdown the message server (USE CAUTION!)"); |
147 | break; | 148 | break; |
148 | 149 | ||
149 | case "shutdown": | 150 | case "shutdown": |
150 | m_console.Close(); | 151 | m_log.Close(); |
151 | Environment.Exit(0); | 152 | Environment.Exit(0); |
152 | break; | 153 | break; |
153 | } | 154 | } |