mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user