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.
This commit is contained in:
Melanie Thielker
2008-08-19 18:34:46 +00:00
parent c71d6f05a7
commit 41440e184b
9 changed files with 52 additions and 169 deletions

View File

@@ -220,6 +220,9 @@ namespace OpenSim.Framework.Communications
}
// Otherwise...
// Create a new agent session
m_userManager.ResetAttachments(userProfile.ID);
CreateAgent(userProfile, request);
try
@@ -390,6 +393,9 @@ namespace OpenSim.Framework.Communications
// Otherwise...
// Create a new agent session
m_userManager.ResetAttachments(userProfile.ID);
CreateAgent(userProfile, request);
try

View File

@@ -83,6 +83,13 @@ namespace OpenSim.Framework.Communications
return null;
}
public void ResetAttachments(LLUUID userID)
{
foreach (IUserDataPlugin plugin in _plugins)
{
plugin.ResetAttachments(userID);
}
}
public UserAgentData GetAgentByUUID(LLUUID userId)
{
foreach (IUserDataPlugin plugin in _plugins)
@@ -639,51 +646,5 @@ namespace OpenSim.Framework.Communications
}
}
}
public void AddAttachment(LLUUID user, LLUUID item)
{
foreach (IUserDataPlugin plugin in _plugins)
{
try
{
plugin.AddAttachment(user, item);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
}
}
}
public void RemoveAttachment(LLUUID user, LLUUID item)
{
foreach (IUserDataPlugin plugin in _plugins)
{
try
{
plugin.RemoveAttachment(user, item);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
}
}
}
public List<LLUUID> GetAttachments(LLUUID user)
{
foreach (IUserDataPlugin plugin in _plugins)
{
try
{
return plugin.GetAttachments(user);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
}
}
return new List<LLUUID>();
}
}
}

View File

@@ -165,10 +165,7 @@ namespace OpenSim.Framework
void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
void AddAttachment(LLUUID user, LLUUID item);
void RemoveAttachment(LLUUID user, LLUUID item);
List<LLUUID> GetAttachments(LLUUID user);
void ResetAttachments(LLUUID userID);
}
public class UserDataInitialiser : PluginInitialiserBase