diff options
author | Melanie Thielker | 2008-08-19 18:34:46 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-19 18:34:46 +0000 |
commit | 41440e184b1c12f1b83d894b2cd5b7b801b4ca38 (patch) | |
tree | 1d3298ae47cc11f0167257a7aab7a45212b7a497 /OpenSim/Framework/Communications | |
parent | Moves one file to it's proper location (diff) | |
download | opensim-SC-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.zip opensim-SC-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.gz opensim-SC-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.bz2 opensim-SC-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.xz |
Attachment persistence (Mantis #1711)
Change user server to handle attachment assets record properly. Ensure
that attachments are not re-rezzed on region crossing. Persistence
will NOT WORK with earliser UGAI!!
Change region server to match.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 53 |
2 files changed, 13 insertions, 46 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 40064d3..73fba1e 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -220,6 +220,9 @@ namespace OpenSim.Framework.Communications | |||
220 | } | 220 | } |
221 | // Otherwise... | 221 | // Otherwise... |
222 | // Create a new agent session | 222 | // Create a new agent session |
223 | |||
224 | m_userManager.ResetAttachments(userProfile.ID); | ||
225 | |||
223 | CreateAgent(userProfile, request); | 226 | CreateAgent(userProfile, request); |
224 | 227 | ||
225 | try | 228 | try |
@@ -390,6 +393,9 @@ namespace OpenSim.Framework.Communications | |||
390 | 393 | ||
391 | // Otherwise... | 394 | // Otherwise... |
392 | // Create a new agent session | 395 | // Create a new agent session |
396 | |||
397 | m_userManager.ResetAttachments(userProfile.ID); | ||
398 | |||
393 | CreateAgent(userProfile, request); | 399 | CreateAgent(userProfile, request); |
394 | 400 | ||
395 | try | 401 | try |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index feeb666..ef900ea 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -83,6 +83,13 @@ namespace OpenSim.Framework.Communications | |||
83 | 83 | ||
84 | return null; | 84 | return null; |
85 | } | 85 | } |
86 | public void ResetAttachments(LLUUID userID) | ||
87 | { | ||
88 | foreach (IUserDataPlugin plugin in _plugins) | ||
89 | { | ||
90 | plugin.ResetAttachments(userID); | ||
91 | } | ||
92 | } | ||
86 | public UserAgentData GetAgentByUUID(LLUUID userId) | 93 | public UserAgentData GetAgentByUUID(LLUUID userId) |
87 | { | 94 | { |
88 | foreach (IUserDataPlugin plugin in _plugins) | 95 | foreach (IUserDataPlugin plugin in _plugins) |
@@ -639,51 +646,5 @@ namespace OpenSim.Framework.Communications | |||
639 | } | 646 | } |
640 | } | 647 | } |
641 | } | 648 | } |
642 | |||
643 | public void AddAttachment(LLUUID user, LLUUID item) | ||
644 | { | ||
645 | foreach (IUserDataPlugin plugin in _plugins) | ||
646 | { | ||
647 | try | ||
648 | { | ||
649 | plugin.AddAttachment(user, item); | ||
650 | } | ||
651 | catch (Exception e) | ||
652 | { | ||
653 | m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString()); | ||
654 | } | ||
655 | } | ||
656 | } | ||
657 | |||
658 | public void RemoveAttachment(LLUUID user, LLUUID item) | ||
659 | { | ||
660 | foreach (IUserDataPlugin plugin in _plugins) | ||
661 | { | ||
662 | try | ||
663 | { | ||
664 | plugin.RemoveAttachment(user, item); | ||
665 | } | ||
666 | catch (Exception e) | ||
667 | { | ||
668 | m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString()); | ||
669 | } | ||
670 | } | ||
671 | } | ||
672 | |||
673 | public List<LLUUID> GetAttachments(LLUUID user) | ||
674 | { | ||
675 | foreach (IUserDataPlugin plugin in _plugins) | ||
676 | { | ||
677 | try | ||
678 | { | ||
679 | return plugin.GetAttachments(user); | ||
680 | } | ||
681 | catch (Exception e) | ||
682 | { | ||
683 | m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); | ||
684 | } | ||
685 | } | ||
686 | return new List<LLUUID>(); | ||
687 | } | ||
688 | } | 649 | } |
689 | } | 650 | } |