aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorMW2008-06-29 20:39:34 +0000
committerMW2008-06-29 20:39:34 +0000
commitb0330a0bb50a3b30dbaa526cdcafd4e0b9aa6c7b (patch)
tree73ac3685bb1105a934fcd59bb882290e31db21fb /OpenSim/Framework/Communications
parent* Reload terrain from archive if there is one (diff)
downloadopensim-SC_OLD-b0330a0bb50a3b30dbaa526cdcafd4e0b9aa6c7b.zip
opensim-SC_OLD-b0330a0bb50a3b30dbaa526cdcafd4e0b9aa6c7b.tar.gz
opensim-SC_OLD-b0330a0bb50a3b30dbaa526cdcafd4e0b9aa6c7b.tar.bz2
opensim-SC_OLD-b0330a0bb50a3b30dbaa526cdcafd4e0b9aa6c7b.tar.xz
disabled the multiple inventory server support in login service again.
And reverted CachedUserInfo back to revision 5262. I don't think most of the inventory problems that people are reporting are due to these, but its easier to deal with one set of potential problems at a time, and I'm not going to get any time in the week to work on this anyway.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs170
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs12
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs16
3 files changed, 64 insertions, 134 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 46387ab..f38a109 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -87,24 +87,6 @@ namespace OpenSim.Framework.Communications.Cache
87 private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders 87 private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders
88 = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); 88 = new Dictionary<LLUUID, IList<InventoryFolderImpl>>();
89 89
90 private string m_inventoryHost
91 {
92 get
93 {
94 if (m_userProfile != null)
95 {
96 if (! String.IsNullOrEmpty(m_userProfile.UserAssetURI))
97 {
98 Uri uri = new Uri(m_userProfile.UserInventoryURI);
99 return uri.Host;
100 }
101 }
102
103 return "";
104 }
105
106 }
107
108 /// <summary> 90 /// <summary>
109 /// Constructor 91 /// Constructor
110 /// </summary> 92 /// </summary>
@@ -170,9 +152,9 @@ namespace OpenSim.Framework.Communications.Cache
170 { 152 {
171 foreach (InventoryFolderImpl folder in pendingCategorizationFolders[newFolder.ID]) 153 foreach (InventoryFolderImpl folder in pendingCategorizationFolders[newFolder.ID])
172 { 154 {
173// m_log.DebugFormat( 155 // m_log.DebugFormat(
174// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", 156 // "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
175// folder.name, folder.folderID, parent.name, parent.folderID); 157 // folder.name, folder.folderID, parent.name, parent.folderID);
176 158
177 lock (newFolder.SubFolders) 159 lock (newFolder.SubFolders)
178 { 160 {
@@ -232,9 +214,9 @@ namespace OpenSim.Framework.Communications.Cache
232 /// <param name="folderInfo"></param> 214 /// <param name="folderInfo"></param>
233 private void FolderReceive(InventoryFolderImpl newFolder) 215 private void FolderReceive(InventoryFolderImpl newFolder)
234 { 216 {
235// m_log.DebugFormat( 217 // m_log.DebugFormat(
236// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", 218 // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
237// folderInfo.Name, folderInfo.ID, userID); 219 // folderInfo.Name, folderInfo.ID, userID);
238 220
239 if (RootFolder == null) 221 if (RootFolder == null)
240 { 222 {
@@ -285,9 +267,9 @@ namespace OpenSim.Framework.Communications.Cache
285 /// <param name="folderInfo"></param> 267 /// <param name="folderInfo"></param>
286 private void ItemReceive(InventoryItemBase itemInfo) 268 private void ItemReceive(InventoryItemBase itemInfo)
287 { 269 {
288// m_log.DebugFormat( 270 // m_log.DebugFormat(
289// "[INVENTORY CACHE]: Received item {0} {1} for user {2}", 271 // "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
290// itemInfo.Name, itemInfo.ID, userID); 272 // itemInfo.Name, itemInfo.ID, userID);
291 InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); 273 InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder);
292 274
293 if (null == folder) 275 if (null == folder)
@@ -315,8 +297,8 @@ namespace OpenSim.Framework.Communications.Cache
315 /// <returns></returns> 297 /// <returns></returns>
316 public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID) 298 public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID)
317 { 299 {
318// m_log.DebugFormat( 300 // m_log.DebugFormat(
319// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); 301 // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
320 302
321 if (HasInventory) 303 if (HasInventory)
322 { 304 {
@@ -343,15 +325,9 @@ namespace OpenSim.Framework.Communications.Cache
343 createdBaseFolder.Type = createdFolder.Type; 325 createdBaseFolder.Type = createdFolder.Type;
344 createdBaseFolder.Version = createdFolder.Version; 326 createdBaseFolder.Version = createdFolder.Version;
345 327
346 IInventoryServices invService = GetInventoryService(); 328 m_commsManager.InventoryService.AddFolder(createdBaseFolder);
347 if (invService != null)
348 {
349 //m_commsManager.InventoryService
350 invService.AddFolder(createdBaseFolder);
351 return true;
352 }
353 329
354 return false; 330 return true;
355 } 331 }
356 else 332 else
357 { 333 {
@@ -390,8 +366,8 @@ namespace OpenSim.Framework.Communications.Cache
390 /// <param name="parentID"></param> 366 /// <param name="parentID"></param>
391 public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) 367 public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
392 { 368 {
393// m_log.DebugFormat( 369 // m_log.DebugFormat(
394// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 370 // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
395 371
396 if (HasInventory) 372 if (HasInventory)
397 { 373 {
@@ -400,22 +376,17 @@ namespace OpenSim.Framework.Communications.Cache
400 baseFolder.ID = folderID; 376 baseFolder.ID = folderID;
401 baseFolder.Name = name; 377 baseFolder.Name = name;
402 baseFolder.ParentID = parentID; 378 baseFolder.ParentID = parentID;
403 baseFolder.Type = (short) type; 379 baseFolder.Type = (short)type;
404 baseFolder.Version = RootFolder.Version; 380 baseFolder.Version = RootFolder.Version;
405 381
406 IInventoryServices invService = GetInventoryService(); 382 m_commsManager.InventoryService.UpdateFolder(baseFolder);
407 if (invService != null) 383
408 { 384 InventoryFolderImpl folder = RootFolder.FindFolder(folderID);
409 //m_commsManager.InventoryService. 385 if (folder != null)
410 invService.UpdateFolder(baseFolder); 386 {
411 387 folder.Name = name;
412 InventoryFolderImpl folder = RootFolder.FindFolder(folderID); 388 folder.ParentID = parentID;
413 if (folder != null) 389 }
414 {
415 folder.Name = name;
416 folder.ParentID = parentID;
417 }
418 }
419 } 390 }
420 else 391 else
421 { 392 {
@@ -439,9 +410,9 @@ namespace OpenSim.Framework.Communications.Cache
439 /// <param name="parentID"></param> 410 /// <param name="parentID"></param>
440 public bool MoveFolder(LLUUID folderID, LLUUID parentID) 411 public bool MoveFolder(LLUUID folderID, LLUUID parentID)
441 { 412 {
442// m_log.DebugFormat( 413 // m_log.DebugFormat(
443// "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", 414 // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
444// parentID, remoteClient.Name, remoteClient.Name, remoteClient.AgentId); 415 // parentID, remoteClient.Name, remoteClient.Name, remoteClient.AgentId);
445 416
446 if (HasInventory) 417 if (HasInventory)
447 { 418 {
@@ -450,24 +421,13 @@ namespace OpenSim.Framework.Communications.Cache
450 baseFolder.ID = folderID; 421 baseFolder.ID = folderID;
451 baseFolder.ParentID = parentID; 422 baseFolder.ParentID = parentID;
452 423
453 IInventoryServices invService = GetInventoryService(); 424 m_commsManager.InventoryService.MoveFolder(baseFolder);
454 if (invService != null) 425
455 { 426 InventoryFolderImpl folder = RootFolder.FindFolder(folderID);
456 // m_commsManager.InventoryService 427 if (folder != null)
457 invService.MoveFolder(baseFolder); 428 folder.ParentID = parentID;
458 429
459 InventoryFolderImpl folder = RootFolder.FindFolder(folderID); 430 return true;
460 if (folder != null)
461 {
462 folder.ParentID = parentID;
463 }
464
465 return true;
466 }
467 else
468 {
469 return false;
470 }
471 } 431 }
472 else 432 else
473 { 433 {
@@ -490,8 +450,8 @@ namespace OpenSim.Framework.Communications.Cache
490 /// <param name="folderID"></param> 450 /// <param name="folderID"></param>
491 public bool PurgeFolder(LLUUID folderID) 451 public bool PurgeFolder(LLUUID folderID)
492 { 452 {
493// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", 453 // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
494// folderID, remoteClient.Name, remoteClient.AgentId); 454 // folderID, remoteClient.Name, remoteClient.AgentId);
495 455
496 if (HasInventory) 456 if (HasInventory)
497 { 457 {
@@ -508,16 +468,11 @@ namespace OpenSim.Framework.Communications.Cache
508 purgedBaseFolder.Type = purgedFolder.Type; 468 purgedBaseFolder.Type = purgedFolder.Type;
509 purgedBaseFolder.Version = purgedFolder.Version; 469 purgedBaseFolder.Version = purgedFolder.Version;
510 470
511 IInventoryServices invService = GetInventoryService(); 471 m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
512 if (invService != null)
513 {
514 //m_commsManager.InventoryService
515 invService.PurgeFolder(purgedBaseFolder);
516 472
517 purgedFolder.Purge(); 473 purgedFolder.Purge();
518 474
519 return true; 475 return true;
520 }
521 } 476 }
522 } 477 }
523 else 478 else
@@ -543,20 +498,14 @@ namespace OpenSim.Framework.Communications.Cache
543 { 498 {
544 if (item.Folder == LLUUID.Zero) 499 if (item.Folder == LLUUID.Zero)
545 { 500 {
546 InventoryFolderImpl f=FindFolderForType(item.AssetType); 501 InventoryFolderImpl f = FindFolderForType(item.AssetType);
547 if (f != null) 502 if (f != null)
548 item.Folder=f.ID; 503 item.Folder = f.ID;
549 else 504 else
550 item.Folder=RootFolder.ID; 505 item.Folder = RootFolder.ID;
551 } 506 }
552 ItemReceive(item); 507 ItemReceive(item);
553 508 m_commsManager.InventoryService.AddItem(item);
554 IInventoryServices invService = GetInventoryService();
555 if (invService != null)
556 {
557 //m_commsManager.InventoryService
558 invService.AddItem(item);
559 }
560 } 509 }
561 else 510 else
562 { 511 {
@@ -576,12 +525,7 @@ namespace OpenSim.Framework.Communications.Cache
576 { 525 {
577 if (HasInventory) 526 if (HasInventory)
578 { 527 {
579 IInventoryServices invService = GetInventoryService(); 528 m_commsManager.InventoryService.UpdateItem(item);
580 if (invService != null)
581 {
582 //m_commsManager.InventoryService
583 invService.UpdateItem(item);
584 }
585 } 529 }
586 else 530 else
587 { 531 {
@@ -620,14 +564,7 @@ namespace OpenSim.Framework.Communications.Cache
620 564
621 if (RootFolder.DeleteItem(item.ID)) 565 if (RootFolder.DeleteItem(item.ID))
622 { 566 {
623 IInventoryServices invService = GetInventoryService(); 567 return m_commsManager.InventoryService.DeleteItem(item);
624 if (invService != null)
625 {
626 //return m_commsManager.InventoryService
627 return invService.DeleteItem(item);
628 }
629
630 return false;
631 } 568 }
632 } 569 }
633 else 570 else
@@ -659,9 +596,9 @@ namespace OpenSim.Framework.Communications.Cache
659 596
660 if ((folder = RootFolder.FindFolder(folderID)) != null) 597 if ((folder = RootFolder.FindFolder(folderID)) != null)
661 { 598 {
662// m_log.DebugFormat( 599 // m_log.DebugFormat(
663// "[AGENT INVENTORY]: Found folder {0} for client {1}", 600 // "[AGENT INVENTORY]: Found folder {0} for client {1}",
664// folderID, remoteClient.AgentId); 601 // folderID, remoteClient.AgentId);
665 602
666 client.SendInventoryFolderDetails( 603 client.SendInventoryFolderDetails(
667 client.AgentId, folderID, folder.RequestListOfItems(), 604 client.AgentId, folderID, folder.RequestListOfItems(),
@@ -693,7 +630,7 @@ namespace OpenSim.Framework.Communications.Cache
693 { 630 {
694 if (RootFolder == null) 631 if (RootFolder == null)
695 return null; 632 return null;
696 633
697 lock (RootFolder.SubFolders) 634 lock (RootFolder.SubFolders)
698 { 635 {
699 foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values) 636 foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values)
@@ -704,13 +641,6 @@ namespace OpenSim.Framework.Communications.Cache
704 } 641 }
705 return null; 642 return null;
706 } 643 }
707
708 public IInventoryServices GetInventoryService()
709 {
710 IInventoryServices invService;
711 m_commsManager.TryGetInventoryService(m_inventoryHost, out invService);
712 return invService;
713 }
714 } 644 }
715 645
716 /// <summary> 646 /// <summary>
@@ -743,4 +673,4 @@ namespace OpenSim.Framework.Communications.Cache
743 m_delegate.DynamicInvoke(m_args); 673 m_delegate.DynamicInvoke(m_args);
744 } 674 }
745 } 675 }
746} 676} \ No newline at end of file
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 37451ab..0040718 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -119,12 +119,12 @@ namespace OpenSim.Framework.Communications.Cache
119 CachedUserInfo userInfo = GetUserDetails(userID); 119 CachedUserInfo userInfo = GetUserDetails(userID);
120 if (userInfo != null) 120 if (userInfo != null)
121 { 121 {
122 //m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); 122 m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
123 IInventoryServices invService = userInfo.GetInventoryService(); 123 //IInventoryServices invService = userInfo.GetInventoryService();
124 if (invService != null) 124 //if (invService != null)
125 { 125 //{
126 invService.RequestInventoryForUser(userID, userInfo.InventoryReceive); 126 // invService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
127 } 127 //}
128 } 128 }
129 else 129 else
130 { 130 {
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 3e1a885..e7124c9 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -231,10 +231,10 @@ namespace OpenSim.Framework.Communications
231 try 231 try
232 { 232 {
233 string inventoryServerUrl = ""; 233 string inventoryServerUrl = "";
234 if (!String.IsNullOrEmpty(userProfile.UserInventoryURI)) 234 //if (!String.IsNullOrEmpty(userProfile.UserInventoryURI))
235 { 235 //{
236 inventoryServerUrl = userProfile.UserInventoryURI; 236 // inventoryServerUrl = userProfile.UserInventoryURI;
237 } 237 //}
238 inventData = GetInventorySkeleton(agentID, inventoryServerUrl); 238 inventData = GetInventorySkeleton(agentID, inventoryServerUrl);
239 } 239 }
240 catch (Exception e) 240 catch (Exception e)
@@ -393,10 +393,10 @@ namespace OpenSim.Framework.Communications
393 // Inventory Library Section 393 // Inventory Library Section
394 394
395 string inventoryServerUrl = ""; 395 string inventoryServerUrl = "";
396 if (!String.IsNullOrEmpty(userProfile.UserInventoryURI)) 396 //if (!String.IsNullOrEmpty(userProfile.UserInventoryURI))
397 { 397 //{
398 inventoryServerUrl = userProfile.UserInventoryURI; 398 // inventoryServerUrl = userProfile.UserInventoryURI;
399 } 399 //}
400 400
401 InventoryData inventData = GetInventorySkeleton(agentID, inventoryServerUrl); 401 InventoryData inventData = GetInventorySkeleton(agentID, inventoryServerUrl);
402 ArrayList AgentInventoryArray = inventData.InventoryArray; 402 ArrayList AgentInventoryArray = inventData.InventoryArray;