diff options
author | Johan Berntsson | 2008-07-23 09:46:04 +0000 |
---|---|---|
committer | Johan Berntsson | 2008-07-23 09:46:04 +0000 |
commit | ce4bcb50655e69277eac64a6d3ab520d669e6b70 (patch) | |
tree | 55391a649d22a534260553dabf47791f4bc650b0 /OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |
parent | Fix issue 1760. If the inventory item is not found, llSay() and throw an exce... (diff) | |
download | opensim-SC_OLD-ce4bcb50655e69277eac64a6d3ab520d669e6b70.zip opensim-SC_OLD-ce4bcb50655e69277eac64a6d3ab520d669e6b70.tar.gz opensim-SC_OLD-ce4bcb50655e69277eac64a6d3ab520d669e6b70.tar.bz2 opensim-SC_OLD-ce4bcb50655e69277eac64a6d3ab520d669e6b70.tar.xz |
The new secure inventory server mode (in r5590) can now be disabled from OpenSim.ini. Default is to use the new mode.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 64 |
1 files changed, 56 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index c125976..383c129 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -335,8 +335,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
335 | createdBaseFolder.Type = createdFolder.Type; | 335 | createdBaseFolder.Type = createdFolder.Type; |
336 | createdBaseFolder.Version = createdFolder.Version; | 336 | createdBaseFolder.Version = createdFolder.Version; |
337 | 337 | ||
338 | m_commsManager.SecureInventoryService.AddFolder(createdBaseFolder, m_session_id); | 338 | if (m_commsManager.SecureInventoryService != null) |
339 | 339 | { | |
340 | m_commsManager.SecureInventoryService.AddFolder(createdBaseFolder, m_session_id); | ||
341 | } | ||
342 | else | ||
343 | { | ||
344 | m_commsManager.InventoryService.AddFolder(createdBaseFolder); | ||
345 | } | ||
340 | return true; | 346 | return true; |
341 | } | 347 | } |
342 | else | 348 | else |
@@ -389,7 +395,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
389 | baseFolder.Type = (short)type; | 395 | baseFolder.Type = (short)type; |
390 | baseFolder.Version = RootFolder.Version; | 396 | baseFolder.Version = RootFolder.Version; |
391 | 397 | ||
392 | m_commsManager.SecureInventoryService.UpdateFolder(baseFolder, m_session_id); | 398 | if (m_commsManager.SecureInventoryService != null) |
399 | { | ||
400 | m_commsManager.SecureInventoryService.UpdateFolder(baseFolder, m_session_id); | ||
401 | } | ||
402 | else | ||
403 | { | ||
404 | m_commsManager.InventoryService.UpdateFolder(baseFolder); | ||
405 | } | ||
393 | 406 | ||
394 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); | 407 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); |
395 | if (folder != null) | 408 | if (folder != null) |
@@ -431,7 +444,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
431 | baseFolder.ID = folderID; | 444 | baseFolder.ID = folderID; |
432 | baseFolder.ParentID = parentID; | 445 | baseFolder.ParentID = parentID; |
433 | 446 | ||
434 | m_commsManager.SecureInventoryService.MoveFolder(baseFolder, m_session_id); | 447 | if (m_commsManager.SecureInventoryService != null) |
448 | { | ||
449 | m_commsManager.SecureInventoryService.MoveFolder(baseFolder, m_session_id); | ||
450 | } | ||
451 | else | ||
452 | { | ||
453 | m_commsManager.InventoryService.MoveFolder(baseFolder); | ||
454 | } | ||
435 | 455 | ||
436 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); | 456 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); |
437 | if (folder != null) | 457 | if (folder != null) |
@@ -478,7 +498,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
478 | purgedBaseFolder.Type = purgedFolder.Type; | 498 | purgedBaseFolder.Type = purgedFolder.Type; |
479 | purgedBaseFolder.Version = purgedFolder.Version; | 499 | purgedBaseFolder.Version = purgedFolder.Version; |
480 | 500 | ||
481 | m_commsManager.SecureInventoryService.PurgeFolder(purgedBaseFolder, m_session_id); | 501 | if (m_commsManager.SecureInventoryService != null) |
502 | { | ||
503 | m_commsManager.SecureInventoryService.PurgeFolder(purgedBaseFolder, m_session_id); | ||
504 | } | ||
505 | else | ||
506 | { | ||
507 | m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); | ||
508 | } | ||
482 | 509 | ||
483 | purgedFolder.Purge(); | 510 | purgedFolder.Purge(); |
484 | 511 | ||
@@ -515,7 +542,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
515 | item.Folder = RootFolder.ID; | 542 | item.Folder = RootFolder.ID; |
516 | } | 543 | } |
517 | ItemReceive(item); | 544 | ItemReceive(item); |
518 | m_commsManager.SecureInventoryService.AddItem(item, m_session_id); | 545 | if (m_commsManager.SecureInventoryService != null) |
546 | { | ||
547 | m_commsManager.SecureInventoryService.AddItem(item, m_session_id); | ||
548 | } | ||
549 | else | ||
550 | { | ||
551 | m_commsManager.InventoryService.AddItem(item); | ||
552 | } | ||
519 | } | 553 | } |
520 | else | 554 | else |
521 | { | 555 | { |
@@ -535,7 +569,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
535 | { | 569 | { |
536 | if (HasInventory) | 570 | if (HasInventory) |
537 | { | 571 | { |
538 | m_commsManager.SecureInventoryService.UpdateItem(item, m_session_id); | 572 | if (m_commsManager.SecureInventoryService != null) |
573 | { | ||
574 | m_commsManager.SecureInventoryService.UpdateItem(item, m_session_id); | ||
575 | } | ||
576 | else | ||
577 | { | ||
578 | m_commsManager.InventoryService.UpdateItem(item); | ||
579 | } | ||
539 | } | 580 | } |
540 | else | 581 | else |
541 | { | 582 | { |
@@ -574,7 +615,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
574 | 615 | ||
575 | if (RootFolder.DeleteItem(item.ID)) | 616 | if (RootFolder.DeleteItem(item.ID)) |
576 | { | 617 | { |
577 | return m_commsManager.SecureInventoryService.DeleteItem(item, m_session_id); | 618 | if (m_commsManager.SecureInventoryService != null) |
619 | { | ||
620 | return m_commsManager.SecureInventoryService.DeleteItem(item, m_session_id); | ||
621 | } | ||
622 | else | ||
623 | { | ||
624 | return m_commsManager.InventoryService.DeleteItem(item); | ||
625 | } | ||
578 | } | 626 | } |
579 | } | 627 | } |
580 | else | 628 | else |