aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-17 19:11:03 +0000
committerJustin Clarke Casey2009-04-17 19:11:03 +0000
commitbd1b478f2c89fc1696b9e8fc6c0deaa9581bd556 (patch)
tree43d93a3562aa3d47e2984fd873b728b9af02f108
parent* Use profile cache service for data snapshot (diff)
downloadopensim-SC_OLD-bd1b478f2c89fc1696b9e8fc6c0deaa9581bd556.zip
opensim-SC_OLD-bd1b478f2c89fc1696b9e8fc6c0deaa9581bd556.tar.gz
opensim-SC_OLD-bd1b478f2c89fc1696b9e8fc6c0deaa9581bd556.tar.bz2
opensim-SC_OLD-bd1b478f2c89fc1696b9e8fc6c0deaa9581bd556.tar.xz
* Change inventory archiver module to use profile cache
* Clean up some log messages
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs55
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs14
3 files changed, 33 insertions, 39 deletions
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index a3d455c..c757a32 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -28,6 +28,7 @@
28/* This file borrows heavily from MXPServer.cs - the reference MXPServer 28/* This file borrows heavily from MXPServer.cs - the reference MXPServer
29 * See http://www.bubblecloud.org for a copy of the original file and 29 * See http://www.bubblecloud.org for a copy of the original file and
30 * implementation details. */ 30 * implementation details. */
31
31using System; 32using System;
32using System.Collections.Generic; 33using System.Collections.Generic;
33using System.Reflection; 34using System.Reflection;
@@ -265,7 +266,7 @@ namespace OpenSim.Client.MXP.PacketHandler
265 266
266 JoinRequestMessage joinRequestMessage = (JoinRequestMessage) message; 267 JoinRequestMessage joinRequestMessage = (JoinRequestMessage) message;
267 268
268 m_log.Info("[MXP ClientStack] Session join request: " + session.SessionId + " (" + 269 m_log.Info("[MXP ClientStack]: Session join request: " + session.SessionId + " (" +
269 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + 270 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" +
270 session.RemoteEndPoint.Port + ")"); 271 session.RemoteEndPoint.Port + ")");
271 272
@@ -275,7 +276,7 @@ namespace OpenSim.Client.MXP.PacketHandler
275 { 276 {
276 if (scene.RegionInfo.RegionName == joinRequestMessage.BubbleName) 277 if (scene.RegionInfo.RegionName == joinRequestMessage.BubbleName)
277 { 278 {
278 m_log.Info("[MXP ClientStack] Resolved region by name: " + joinRequestMessage.BubbleName + " (" + scene.RegionInfo.RegionID + ")"); 279 m_log.Info("[MXP ClientStack]: Resolved region by name: " + joinRequestMessage.BubbleName + " (" + scene.RegionInfo.RegionID + ")");
279 joinRequestMessage.BubbleId = scene.RegionInfo.RegionID.Guid; 280 joinRequestMessage.BubbleId = scene.RegionInfo.RegionID.Guid;
280 } 281 }
281 } 282 }
@@ -283,7 +284,7 @@ namespace OpenSim.Client.MXP.PacketHandler
283 284
284 if (joinRequestMessage.BubbleId == Guid.Empty) 285 if (joinRequestMessage.BubbleId == Guid.Empty)
285 { 286 {
286 m_log.Warn("[MXP ClientStack] Failed to resolve region by name: " + joinRequestMessage.BubbleName); 287 m_log.Warn("[MXP ClientStack]: Failed to resolve region by name: " + joinRequestMessage.BubbleName);
287 } 288 }
288 289
289 UUID sceneId = new UUID(joinRequestMessage.BubbleId); 290 UUID sceneId = new UUID(joinRequestMessage.BubbleId);
@@ -291,7 +292,7 @@ namespace OpenSim.Client.MXP.PacketHandler
291 bool regionExists = true; 292 bool regionExists = true;
292 if (!m_scenes.ContainsKey(sceneId)) 293 if (!m_scenes.ContainsKey(sceneId))
293 { 294 {
294 m_log.Info("[MXP ClientStack] No such region: " + sceneId); 295 m_log.Info("[MXP ClientStack]: No such region: " + sceneId);
295 regionExists=false; 296 regionExists=false;
296 } 297 }
297 298
@@ -309,49 +310,49 @@ namespace OpenSim.Client.MXP.PacketHandler
309 Scene scene = m_scenes[sceneId]; 310 Scene scene = m_scenes[sceneId];
310 UUID mxpSessionID = UUID.Random(); 311 UUID mxpSessionID = UUID.Random();
311 312
312 m_log.Info("[MXP ClientStack] Session join request success: " + session.SessionId + " (" + 313 m_log.Debug("[MXP ClientStack]: Session join request success: " + session.SessionId + " (" +
313 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + 314 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" +
314 session.RemoteEndPoint.Port + ")"); 315 session.RemoteEndPoint.Port + ")");
315 316
316 m_log.Info("[MXP ClientStack] Attaching UserAgent to UserProfile..."); 317 m_log.Debug("[MXP ClientStack]: Attaching UserAgent to UserProfile...");
317 AttachUserAgentToUserProfile(session, mxpSessionID, sceneId, user); 318 AttachUserAgentToUserProfile(session, mxpSessionID, sceneId, user);
318 m_log.Info("[MXP ClientStack] Attached UserAgent to UserProfile."); 319 m_log.Debug("[MXP ClientStack]: Attached UserAgent to UserProfile.");
319 m_log.Info("[MXP ClientStack] Preparing Scene to Connection..."); 320 m_log.Debug("[MXP ClientStack]: Preparing Scene to Connection...");
320 PrepareSceneForConnection(mxpSessionID, sceneId, user); 321 PrepareSceneForConnection(mxpSessionID, sceneId, user);
321 m_log.Info("[MXP ClientStack] Prepared Scene to Connection."); 322 m_log.Debug("[MXP ClientStack]: Prepared Scene to Connection.");
322 m_log.Info("[MXP ClientStack] Accepting connection..."); 323 m_log.Debug("[MXP ClientStack]: Accepting connection...");
323 AcceptConnection(session, joinRequestMessage, mxpSessionID, userId); 324 AcceptConnection(session, joinRequestMessage, mxpSessionID, userId);
324 m_log.Info("[MXP ClientStack] Accepted connection."); 325 m_log.Info("[MXP ClientStack]: Accepted connection.");
325 326
326 m_log.Info("[MXP ClientStack] Creating ClientView...."); 327 m_log.Debug("[MXP ClientStack]: Creating ClientView....");
327 MXPClientView client = new MXPClientView(session, mxpSessionID, userId, scene, firstName, lastName); 328 MXPClientView client = new MXPClientView(session, mxpSessionID, userId, scene, firstName, lastName);
328 m_clients.Add(client); 329 m_clients.Add(client);
329 m_log.Info("[MXP ClientStack] Created ClientView."); 330 m_log.Debug("[MXP ClientStack]: Created ClientView.");
330 331
331 332
332 m_log.Info("[MXP ClientStack] Adding ClientView to Scene..."); 333 m_log.Debug("[MXP ClientStack]: Adding ClientView to Scene...");
333 scene.ClientManager.Add(client.CircuitCode, client); 334 scene.ClientManager.Add(client.CircuitCode, client);
334 m_log.Info("[MXP ClientStack] Added ClientView to Scene."); 335 m_log.Debug("[MXP ClientStack]: Added ClientView to Scene.");
335 336
336 337
337 client.MXPSendSynchronizationBegin(m_scenes[new UUID(joinRequestMessage.BubbleId)].SceneContents.GetTotalObjectsCount()); 338 client.MXPSendSynchronizationBegin(m_scenes[new UUID(joinRequestMessage.BubbleId)].SceneContents.GetTotalObjectsCount());
338 339
339 m_log.Info("[MXP ClientStack] Starting ClientView..."); 340 m_log.Debug("[MXP ClientStack]: Starting ClientView...");
340 try 341 try
341 { 342 {
342 client.Start(); 343 client.Start();
343 m_log.Info("[MXP ClientStack] Started ClientView."); 344 m_log.Debug("[MXP ClientStack]: Started ClientView.");
344 } 345 }
345 catch (Exception e) 346 catch (Exception e)
346 { 347 {
347 m_log.Info(e); 348 m_log.Error(e);
348 } 349 }
349 350
350 m_log.Info("[MXP ClientStack] Connected"); 351 m_log.Debug("[MXP ClientStack]: Connected");
351 } 352 }
352 else 353 else
353 { 354 {
354 m_log.Info("[MXP ClientStack] Session join request failure: " + session.SessionId + " (" + 355 m_log.Info("[MXP ClientStack]: Session join request failure: " + session.SessionId + " (" +
355 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + 356 (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" +
356 session.RemoteEndPoint.Port + ")"); 357 session.RemoteEndPoint.Port + ")");
357 358
@@ -382,7 +383,7 @@ namespace OpenSim.Client.MXP.PacketHandler
382 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)MessageFactory.Current.ReserveMessage( 383 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)MessageFactory.Current.ReserveMessage(
383 typeof(LeaveResponseMessage)); 384 typeof(LeaveResponseMessage));
384 385
385 m_log.Info("[MXP ClientStack] Session leave request: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 386 m_log.Debug("[MXP ClientStack]: Session leave request: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
386 387
387 leaveResponseMessage.RequestMessageId = message.MessageId; 388 leaveResponseMessage.RequestMessageId = message.MessageId;
388 leaveResponseMessage.FailureCode = 0; 389 leaveResponseMessage.FailureCode = 0;
@@ -393,21 +394,21 @@ namespace OpenSim.Client.MXP.PacketHandler
393 session.SetStateDisconnected(); 394 session.SetStateDisconnected();
394 } 395 }
395 396
396 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 397 m_log.Debug("[MXP ClientStack]: Removing Client from Scene");
397 //clientView.Scene.RemoveClient(clientView.AgentId); 398 //clientView.Scene.RemoveClient(clientView.AgentId);
398 } 399 }
399 if (message.GetType() == typeof(LeaveResponseMessage)) 400 if (message.GetType() == typeof(LeaveResponseMessage))
400 { 401 {
401 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)message; 402 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)message;
402 403
403 m_log.Info("[MXP ClientStack] Session leave response: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 404 m_log.Debug("[MXP ClientStack]: Session leave response: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
404 405
405 if (leaveResponseMessage.FailureCode == 0) 406 if (leaveResponseMessage.FailureCode == 0)
406 { 407 {
407 session.SetStateDisconnected(); 408 session.SetStateDisconnected();
408 } 409 }
409 410
410 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 411 m_log.Debug("[MXP ClientStack]: Removing Client from Scene");
411 //clientView.Scene.RemoveClient(clientView.AgentId); 412 //clientView.Scene.RemoveClient(clientView.AgentId);
412 } 413 }
413 else 414 else
@@ -484,7 +485,7 @@ namespace OpenSim.Client.MXP.PacketHandler
484 string[] nameParts = participantName.Split(' '); 485 string[] nameParts = participantName.Split(' ');
485 if (nameParts.Length != 2) 486 if (nameParts.Length != 2)
486 { 487 {
487 m_log.Info("[MXP ClientStack] Login failed as user name is not formed of first and last name separated by space: " + participantName); 488 m_log.Error("[MXP ClientStack]: Login failed as user name is not formed of first and last name separated by space: " + participantName);
488 return false; 489 return false;
489 } 490 }
490 firstName = nameParts[0]; 491 firstName = nameParts[0];
@@ -500,7 +501,7 @@ namespace OpenSim.Client.MXP.PacketHandler
500 { 501 {
501 if (userProfile == null) 502 if (userProfile == null)
502 { 503 {
503 m_log.Info("[MXP ClientStack] Login failed as user was not found: " + participantName); 504 m_log.Error("[MXP ClientStack]: Login failed as user was not found: " + participantName);
504 return false; 505 return false;
505 } 506 }
506 userId = userProfile.ID; 507 userId = userProfile.ID;
@@ -598,7 +599,7 @@ namespace OpenSim.Client.MXP.PacketHandler
598 599
599 public void PrintDebugInformation() 600 public void PrintDebugInformation()
600 { 601 {
601 m_log.Info("[MXP ClientStack] Statistics report"); 602 m_log.Info("[MXP ClientStack]: Statistics report");
602 m_log.Info("Pending Sessions: " + PendingSessionCount); 603 m_log.Info("Pending Sessions: " + PendingSessionCount);
603 m_log.Info("Sessions: " + SessionCount + " (Clients: " + m_clients.Count + " )"); 604 m_log.Info("Sessions: " + SessionCount + " (Clients: " + m_clients.Count + " )");
604 m_log.Info("Transmitter Alive?: " + IsTransmitterAlive); 605 m_log.Info("Transmitter Alive?: " + IsTransmitterAlive);
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index d491309..bb289e3 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -292,7 +292,8 @@ namespace OpenSim.Framework.Communications.Services
292 } 292 }
293 } 293 }
294 294
295 protected virtual bool TryAuthenticateXmlRpcLogin(XmlRpcRequest request, string firstname, string lastname, out UserProfileData userProfile) 295 protected virtual bool TryAuthenticateXmlRpcLogin(
296 XmlRpcRequest request, string firstname, string lastname, out UserProfileData userProfile)
296 { 297 {
297 Hashtable requestData = (Hashtable)request.Params[0]; 298 Hashtable requestData = (Hashtable)request.Params[0];
298 299
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index f8a5d9f..c5699c0 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -234,20 +234,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
234 /// <returns></returns> 234 /// <returns></returns>
235 protected CachedUserInfo GetUserInfo(string firstName, string lastName) 235 protected CachedUserInfo GetUserInfo(string firstName, string lastName)
236 { 236 {
237 UserProfileData userProfile = CommsManager.UserService.GetUserProfile(firstName, lastName); 237 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
238
239 if (null == userProfile)
240 {
241 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Failed to find user {0} {1}", firstName, lastName);
242 return null;
243 }
244
245 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(userProfile.ID);
246 if (null == userInfo) 238 if (null == userInfo)
247 { 239 {
248 m_log.ErrorFormat( 240 m_log.ErrorFormat(
249 "[INVENTORY ARCHIVER]: Failed to find user info for {0} {1} {2}", 241 "[INVENTORY ARCHIVER]: Failed to find user info for {0} {1}",
250 firstName, lastName, userProfile.ID); 242 firstName, lastName);
251 return null; 243 return null;
252 } 244 }
253 245