diff options
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 55 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/MessageServersConnector.cs | 16 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 42 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 14 |
4 files changed, 58 insertions, 69 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 32cefc1..8b9fd62 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Grid.UserServer | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback | 43 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private UserConfig Cfg; | 47 | private UserConfig Cfg; |
46 | 48 | ||
47 | public UserManager m_userManager; | 49 | public UserManager m_userManager; |
@@ -53,7 +55,9 @@ namespace OpenSim.Grid.UserServer | |||
53 | [STAThread] | 55 | [STAThread] |
54 | public static void Main(string[] args) | 56 | public static void Main(string[] args) |
55 | { | 57 | { |
56 | Console.WriteLine("Launching UserServer..."); | 58 | log4net.Config.XmlConfigurator.Configure(); |
59 | |||
60 | m_log.Info("Launching UserServer..."); | ||
57 | 61 | ||
58 | OpenUser_Main userserver = new OpenUser_Main(); | 62 | OpenUser_Main userserver = new OpenUser_Main(); |
59 | 63 | ||
@@ -63,22 +67,17 @@ namespace OpenSim.Grid.UserServer | |||
63 | 67 | ||
64 | private OpenUser_Main() | 68 | private OpenUser_Main() |
65 | { | 69 | { |
66 | if (!Directory.Exists(Util.logDir())) | 70 | m_console = new ConsoleBase("OpenUser", this); |
67 | { | 71 | MainConsole.Instance = m_console; |
68 | Directory.CreateDirectory(Util.logDir()); | ||
69 | } | ||
70 | m_log = | ||
71 | new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); | ||
72 | MainLog.Instance = m_log; | ||
73 | } | 72 | } |
74 | 73 | ||
75 | private void Work() | 74 | private void Work() |
76 | { | 75 | { |
77 | m_log.Notice("Enter help for a list of commands\n"); | 76 | m_console.Notice("Enter help for a list of commands\n"); |
78 | 77 | ||
79 | while (true) | 78 | while (true) |
80 | { | 79 | { |
81 | m_log.MainLogPrompt(); | 80 | m_console.Prompt(); |
82 | } | 81 | } |
83 | } | 82 | } |
84 | 83 | ||
@@ -88,7 +87,7 @@ namespace OpenSim.Grid.UserServer | |||
88 | 87 | ||
89 | StatsManager.StartCollectingUserStats(); | 88 | StatsManager.StartCollectingUserStats(); |
90 | 89 | ||
91 | MainLog.Instance.Verbose("REGION", "Establishing data connection"); | 90 | m_log.Info("[REGION]: Establishing data connection"); |
92 | m_userManager = new UserManager(); | 91 | m_userManager = new UserManager(); |
93 | m_userManager._config = Cfg; | 92 | m_userManager._config = Cfg; |
94 | m_userManager.AddPlugin(Cfg.DatabaseProvider); | 93 | m_userManager.AddPlugin(Cfg.DatabaseProvider); |
@@ -96,11 +95,11 @@ namespace OpenSim.Grid.UserServer | |||
96 | m_loginService = new UserLoginService( | 95 | m_loginService = new UserLoginService( |
97 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 96 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
98 | 97 | ||
99 | m_messagesService = new MessageServersConnector(MainLog.Instance); | 98 | m_messagesService = new MessageServersConnector(); |
100 | 99 | ||
101 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; | 100 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; |
102 | 101 | ||
103 | MainLog.Instance.Verbose("REGION", "Starting HTTP process"); | 102 | m_log.Info("[REGION]: Starting HTTP process"); |
104 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); | 103 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); |
105 | 104 | ||
106 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 105 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
@@ -128,10 +127,9 @@ namespace OpenSim.Grid.UserServer | |||
128 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 127 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
129 | 128 | ||
130 | httpServer.Start(); | 129 | httpServer.Start(); |
131 | m_log.Status("SERVER", "Userserver 0.4 - Startup complete"); | 130 | m_log.Info("[SERVER]: Userserver 0.4 - Startup complete"); |
132 | } | 131 | } |
133 | 132 | ||
134 | |||
135 | public void do_create(string what) | 133 | public void do_create(string what) |
136 | { | 134 | { |
137 | switch (what) | 135 | switch (what) |
@@ -143,11 +141,11 @@ namespace OpenSim.Grid.UserServer | |||
143 | uint regX = 1000; | 141 | uint regX = 1000; |
144 | uint regY = 1000; | 142 | uint regY = 1000; |
145 | 143 | ||
146 | tempfirstname = m_log.CmdPrompt("First name"); | 144 | tempfirstname = m_console.CmdPrompt("First name"); |
147 | templastname = m_log.CmdPrompt("Last name"); | 145 | templastname = m_console.CmdPrompt("Last name"); |
148 | tempMD5Passwd = m_log.PasswdPrompt("Password"); | 146 | tempMD5Passwd = m_console.PasswdPrompt("Password"); |
149 | regX = Convert.ToUInt32(m_log.CmdPrompt("Start Region X")); | 147 | regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); |
150 | regY = Convert.ToUInt32(m_log.CmdPrompt("Start Region Y")); | 148 | regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); |
151 | 149 | ||
152 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); | 150 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); |
153 | 151 | ||
@@ -158,7 +156,7 @@ namespace OpenSim.Grid.UserServer | |||
158 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 156 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
159 | } catch (Exception ex) | 157 | } catch (Exception ex) |
160 | { | 158 | { |
161 | m_log.Error("SERVER", "Error creating user: {0}", ex.ToString()); | 159 | m_log.Error(String.Format("[SERVER]: Error creating user: {0}", ex.ToString())); |
162 | } | 160 | } |
163 | 161 | ||
164 | try | 162 | try |
@@ -168,7 +166,7 @@ namespace OpenSim.Grid.UserServer | |||
168 | } | 166 | } |
169 | catch (Exception ex) | 167 | catch (Exception ex) |
170 | { | 168 | { |
171 | m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); | 169 | m_log.Error(String.Format("[SERVER]: Error creating inventory for user: {0}", ex.ToString())); |
172 | } | 170 | } |
173 | m_lastCreatedUser = userID; | 171 | m_lastCreatedUser = userID; |
174 | break; | 172 | break; |
@@ -182,9 +180,9 @@ namespace OpenSim.Grid.UserServer | |||
182 | switch (cmd) | 180 | switch (cmd) |
183 | { | 181 | { |
184 | case "help": | 182 | case "help": |
185 | m_log.Notice("create user - create a new user"); | 183 | m_console.Notice("create user - create a new user"); |
186 | m_log.Notice("stats - statistical information for this server"); | 184 | m_console.Notice("stats - statistical information for this server"); |
187 | m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | 185 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); |
188 | break; | 186 | break; |
189 | 187 | ||
190 | case "create": | 188 | case "create": |
@@ -193,12 +191,12 @@ namespace OpenSim.Grid.UserServer | |||
193 | 191 | ||
194 | case "shutdown": | 192 | case "shutdown": |
195 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; | 193 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; |
196 | m_log.Close(); | 194 | m_console.Close(); |
197 | Environment.Exit(0); | 195 | Environment.Exit(0); |
198 | break; | 196 | break; |
199 | 197 | ||
200 | case "stats": | 198 | case "stats": |
201 | MainLog.Instance.Notice("STATS", Environment.NewLine + StatsManager.UserStats.Report()); | 199 | m_console.Notice(StatsManager.UserStats.Report()); |
202 | break; | 200 | break; |
203 | 201 | ||
204 | case "test-inventory": | 202 | case "test-inventory": |
@@ -218,8 +216,9 @@ namespace OpenSim.Grid.UserServer | |||
218 | 216 | ||
219 | public void TestResponse(List<InventoryFolderBase> resp) | 217 | public void TestResponse(List<InventoryFolderBase> resp) |
220 | { | 218 | { |
221 | Console.WriteLine("response got"); | 219 | m_console.Notice("response got"); |
222 | } | 220 | } |
221 | |||
223 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) | 222 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) |
224 | { | 223 | { |
225 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position); | 224 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position); |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 93d5925..251644b 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -39,15 +39,14 @@ using OpenSim.Framework.Servers; | |||
39 | 39 | ||
40 | namespace OpenSim.Grid.UserServer | 40 | namespace OpenSim.Grid.UserServer |
41 | { | 41 | { |
42 | |||
43 | public class MessageServersConnector | 42 | public class MessageServersConnector |
44 | { | 43 | { |
45 | private LogBase m_log; | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | |||
46 | public Dictionary<string, MessageServerInfo> MessageServers; | 46 | public Dictionary<string, MessageServerInfo> MessageServers; |
47 | 47 | ||
48 | public MessageServersConnector(LogBase log) | 48 | public MessageServersConnector() |
49 | { | 49 | { |
50 | m_log=log; | ||
51 | MessageServers = new Dictionary<string, MessageServerInfo>(); | 50 | MessageServers = new Dictionary<string, MessageServerInfo>(); |
52 | } | 51 | } |
53 | 52 | ||
@@ -65,7 +64,7 @@ namespace OpenSim.Grid.UserServer | |||
65 | { | 64 | { |
66 | if (!MessageServers.ContainsKey(URI)) | 65 | if (!MessageServers.ContainsKey(URI)) |
67 | { | 66 | { |
68 | m_log.Warn("MSGSERVER", "Got addResponsibleRegion Request for a MessageServer that isn't registered"); | 67 | m_log.Warn("[MSGSERVER]: Got addResponsibleRegion Request for a MessageServer that isn't registered"); |
69 | } | 68 | } |
70 | else | 69 | else |
71 | { | 70 | { |
@@ -78,7 +77,7 @@ namespace OpenSim.Grid.UserServer | |||
78 | { | 77 | { |
79 | if (!MessageServers.ContainsKey(URI)) | 78 | if (!MessageServers.ContainsKey(URI)) |
80 | { | 79 | { |
81 | m_log.Warn("MSGSERVER", "Got RemoveResponsibleRegion Request for a MessageServer that isn't registered"); | 80 | m_log.Warn("[MSGSERVER]: Got RemoveResponsibleRegion Request for a MessageServer that isn't registered"); |
82 | } | 81 | } |
83 | else | 82 | else |
84 | { | 83 | { |
@@ -175,10 +174,7 @@ namespace OpenSim.Grid.UserServer | |||
175 | 174 | ||
176 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); | 175 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); |
177 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 176 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); |
178 | m_log.Verbose("LOGIN","Notified : " + serv.URI + " about user login"); | 177 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); |
179 | |||
180 | } | 178 | } |
181 | |||
182 | |||
183 | } | 179 | } |
184 | } | 180 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 10f9468..d5cdf1c 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -46,9 +46,10 @@ namespace OpenSim.Grid.UserServer | |||
46 | { | 46 | { |
47 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position); | 47 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position); |
48 | 48 | ||
49 | |||
50 | public class UserLoginService : LoginService | 49 | public class UserLoginService : LoginService |
51 | { | 50 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; | 53 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; |
53 | 54 | ||
54 | public UserConfig m_config; | 55 | public UserConfig m_config; |
@@ -70,7 +71,7 @@ namespace OpenSim.Grid.UserServer | |||
70 | { | 71 | { |
71 | bool tryDefault = false; | 72 | bool tryDefault = false; |
72 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. | 73 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. |
73 | //CFK: MainLog.Instance.Verbose("LOGIN", "Load information from the gridserver"); | 74 | //CFK: m_log.Info("[LOGIN]: Load information from the gridserver"); |
74 | RegionProfileData SimInfo = new RegionProfileData(); | 75 | RegionProfileData SimInfo = new RegionProfileData(); |
75 | try | 76 | try |
76 | { | 77 | { |
@@ -80,7 +81,7 @@ namespace OpenSim.Grid.UserServer | |||
80 | 81 | ||
81 | // Customise the response | 82 | // Customise the response |
82 | //CFK: This is redundant and the next message should always appear. | 83 | //CFK: This is redundant and the next message should always appear. |
83 | //CFK: MainLog.Instance.Verbose("LOGIN", "Home Location"); | 84 | //CFK: m_log.Info("[LOGIN]: Home Location"); |
84 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + | 85 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + |
85 | (SimInfo.regionLocY*256).ToString() + "], " + | 86 | (SimInfo.regionLocY*256).ToString() + "], " + |
86 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 87 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + |
@@ -91,7 +92,7 @@ namespace OpenSim.Grid.UserServer | |||
91 | // Destination | 92 | // Destination |
92 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 93 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
93 | //CFK: the next one for X & Y and comment this one. | 94 | //CFK: the next one for X & Y and comment this one. |
94 | //CFK: MainLog.Instance.Verbose("LOGIN", "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + | 95 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + |
95 | //CFK: "; Region Y: " + SimInfo.regionLocY); | 96 | //CFK: "; Region Y: " + SimInfo.regionLocY); |
96 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); | 97 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); |
97 | response.SimPort = (uint) SimInfo.serverPort; | 98 | response.SimPort = (uint) SimInfo.serverPort; |
@@ -105,7 +106,7 @@ namespace OpenSim.Grid.UserServer | |||
105 | // Notify the target of an incoming user | 106 | // Notify the target of an incoming user |
106 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 107 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
107 | //CFK: the next one for X & Y and comment this one. | 108 | //CFK: the next one for X & Y and comment this one. |
108 | //CFK: MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " (" + SimInfo.serverURI + ") " + | 109 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + |
109 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); | 110 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); |
110 | 111 | ||
111 | // Prepare notification | 112 | // Prepare notification |
@@ -128,7 +129,7 @@ namespace OpenSim.Grid.UserServer | |||
128 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 129 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
129 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 130 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; |
130 | 131 | ||
131 | MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + | 132 | m_log.Info("[LOGIN]: " + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + |
132 | SimInfo.regionLocX + "," + SimInfo.regionLocY); | 133 | SimInfo.regionLocX + "," + SimInfo.regionLocY); |
133 | 134 | ||
134 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 135 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
@@ -145,9 +146,8 @@ namespace OpenSim.Grid.UserServer | |||
145 | 146 | ||
146 | ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256); | 147 | ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256); |
147 | 148 | ||
148 | MainLog.Instance.Warn( | 149 | m_log.Warn( |
149 | "LOGIN", | 150 | "[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString()); |
150 | "Home region not available: sending to default " + defaultHandle.ToString()); | ||
151 | 151 | ||
152 | SimInfo = new RegionProfileData(); | 152 | SimInfo = new RegionProfileData(); |
153 | try | 153 | try |
@@ -157,7 +157,7 @@ namespace OpenSim.Grid.UserServer | |||
157 | m_config.GridSendKey, m_config.GridRecvKey); | 157 | m_config.GridSendKey, m_config.GridRecvKey); |
158 | 158 | ||
159 | // Customise the response | 159 | // Customise the response |
160 | MainLog.Instance.Verbose("LOGIN", "Home Location"); | 160 | m_log.Info("[LOGIN]: Home Location"); |
161 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + | 161 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + |
162 | (SimInfo.regionLocY*256).ToString() + "], " + | 162 | (SimInfo.regionLocY*256).ToString() + "], " + |
163 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 163 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + |
@@ -166,9 +166,9 @@ namespace OpenSim.Grid.UserServer | |||
166 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 166 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
167 | 167 | ||
168 | // Destination | 168 | // Destination |
169 | MainLog.Instance.Verbose("LOGIN", | 169 | m_log.Info("[LOGIN]: " + |
170 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + | 170 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + |
171 | SimInfo.regionLocY); | 171 | SimInfo.regionLocY); |
172 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); | 172 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); |
173 | response.SimPort = (uint) SimInfo.serverPort; | 173 | response.SimPort = (uint) SimInfo.serverPort; |
174 | response.RegionX = SimInfo.regionLocX; | 174 | response.RegionX = SimInfo.regionLocX; |
@@ -179,7 +179,7 @@ namespace OpenSim.Grid.UserServer | |||
179 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; | 179 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; |
180 | 180 | ||
181 | // Notify the target of an incoming user | 181 | // Notify the target of an incoming user |
182 | MainLog.Instance.Verbose("LOGIN", "Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); | 182 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); |
183 | 183 | ||
184 | // Update agent with target sim | 184 | // Update agent with target sim |
185 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 185 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
@@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer | |||
201 | ArrayList SendParams = new ArrayList(); | 201 | ArrayList SendParams = new ArrayList(); |
202 | SendParams.Add(SimParams); | 202 | SendParams.Add(SimParams); |
203 | 203 | ||
204 | MainLog.Instance.Verbose("LOGIN", "Informing region at " + SimInfo.httpServerURI); | 204 | m_log.Info("[LOGIN]: Informing region at " + SimInfo.httpServerURI); |
205 | // Send | 205 | // Send |
206 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 206 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
207 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); | 207 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); |
@@ -213,8 +213,8 @@ namespace OpenSim.Grid.UserServer | |||
213 | 213 | ||
214 | catch (Exception e) | 214 | catch (Exception e) |
215 | { | 215 | { |
216 | MainLog.Instance.Warn("LOGIN", "Default region also not available"); | 216 | m_log.Warn("[LOGIN]: Default region also not available"); |
217 | MainLog.Instance.Warn("LOGIN", e.ToString()); | 217 | m_log.Warn("[LOGIN]: " + e.ToString()); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | } | 220 | } |
@@ -230,8 +230,8 @@ namespace OpenSim.Grid.UserServer | |||
230 | // which does. | 230 | // which does. |
231 | if (null == folders | folders.Count == 0) | 231 | if (null == folders | folders.Count == 0) |
232 | { | 232 | { |
233 | MainLog.Instance.Warn( | 233 | m_log.Warn( |
234 | "LOGIN", | 234 | "[LOGIN]: " + |
235 | "A root inventory folder for user ID " + userID + " was not found. A new set" | 235 | "A root inventory folder for user ID " + userID + " was not found. A new set" |
236 | + " of empty inventory folders is being created."); | 236 | + " of empty inventory folders is being created."); |
237 | 237 | ||
@@ -269,8 +269,8 @@ namespace OpenSim.Grid.UserServer | |||
269 | } | 269 | } |
270 | else | 270 | else |
271 | { | 271 | { |
272 | MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" + | 272 | m_log.Warn("[LOGIN]: The root inventory folder could still not be retrieved" + |
273 | " for user ID " + userID); | 273 | " for user ID " + userID); |
274 | 274 | ||
275 | AgentInventory userInventory = new AgentInventory(); | 275 | AgentInventory userInventory = new AgentInventory(); |
276 | userInventory.CreateRootFolder(userID, false); | 276 | userInventory.CreateRootFolder(userID, false); |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index c36de7f..8f2d83c 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Grid.UserServer | |||
39 | { | 39 | { |
40 | public class UserManager : UserManagerBase | 40 | public class UserManager : UserManagerBase |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// Deletes an active agent session | 45 | /// Deletes an active agent session |
44 | /// </summary> | 46 | /// </summary> |
@@ -106,6 +108,7 @@ namespace OpenSim.Grid.UserServer | |||
106 | 108 | ||
107 | return response; | 109 | return response; |
108 | } | 110 | } |
111 | |||
109 | /// <summary> | 112 | /// <summary> |
110 | /// Converts a user profile to an XML element which can be returned | 113 | /// Converts a user profile to an XML element which can be returned |
111 | /// </summary> | 114 | /// </summary> |
@@ -202,7 +205,6 @@ namespace OpenSim.Grid.UserServer | |||
202 | responseData["returnString"] = returnString; | 205 | responseData["returnString"] = returnString; |
203 | response.Value = responseData; | 206 | response.Value = responseData; |
204 | return response; | 207 | return response; |
205 | |||
206 | } | 208 | } |
207 | 209 | ||
208 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) | 210 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) |
@@ -212,8 +214,6 @@ namespace OpenSim.Grid.UserServer | |||
212 | Hashtable responseData = new Hashtable(); | 214 | Hashtable responseData = new Hashtable(); |
213 | string returnString = "FALSE"; | 215 | string returnString = "FALSE"; |
214 | 216 | ||
215 | |||
216 | |||
217 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 217 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) |
218 | { | 218 | { |
219 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); | 219 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); |
@@ -233,8 +233,6 @@ namespace OpenSim.Grid.UserServer | |||
233 | 233 | ||
234 | List<FriendListItem> returndata = new List<FriendListItem>(); | 234 | List<FriendListItem> returndata = new List<FriendListItem>(); |
235 | 235 | ||
236 | |||
237 | |||
238 | if (requestData.Contains("ownerID")) | 236 | if (requestData.Contains("ownerID")) |
239 | { | 237 | { |
240 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); | 238 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); |
@@ -309,7 +307,6 @@ namespace OpenSim.Grid.UserServer | |||
309 | return CreateUnknownUserErrorResponse(); | 307 | return CreateUnknownUserErrorResponse(); |
310 | } | 308 | } |
311 | 309 | ||
312 | |||
313 | return ProfileToXmlRPCResponse(userProfile); | 310 | return ProfileToXmlRPCResponse(userProfile); |
314 | } | 311 | } |
315 | 312 | ||
@@ -318,7 +315,6 @@ namespace OpenSim.Grid.UserServer | |||
318 | XmlRpcResponse response = new XmlRpcResponse(); | 315 | XmlRpcResponse response = new XmlRpcResponse(); |
319 | Hashtable requestData = (Hashtable)request.Params[0]; | 316 | Hashtable requestData = (Hashtable)request.Params[0]; |
320 | 317 | ||
321 | |||
322 | UserProfileData userProfile; | 318 | UserProfileData userProfile; |
323 | 319 | ||
324 | if (requestData.Contains("avatar_uuid")) | 320 | if (requestData.Contains("avatar_uuid")) |
@@ -336,17 +332,15 @@ namespace OpenSim.Grid.UserServer | |||
336 | } | 332 | } |
337 | catch (FormatException) | 333 | catch (FormatException) |
338 | { | 334 | { |
339 | OpenSim.Framework.Console.MainLog.Instance.Warn("LOGOUT", "Error in Logout XMLRPC Params"); | 335 | m_log.Warn("[LOGOUT]: Error in Logout XMLRPC Params"); |
340 | return response; | 336 | return response; |
341 | } | 337 | } |
342 | |||
343 | } | 338 | } |
344 | else | 339 | else |
345 | { | 340 | { |
346 | return CreateUnknownUserErrorResponse(); | 341 | return CreateUnknownUserErrorResponse(); |
347 | } | 342 | } |
348 | 343 | ||
349 | |||
350 | return response; | 344 | return response; |
351 | } | 345 | } |
352 | 346 | ||