* Comment out user profile cache update method for now
parent
27c8cc5b1f
commit
607156cae8
|
@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
private readonly CommunicationsManager m_commsManager;
|
private readonly CommunicationsManager m_commsManager;
|
||||||
|
|
||||||
public UserProfileData UserProfile { get { return m_userProfile; } }
|
public UserProfileData UserProfile { get { return m_userProfile; } }
|
||||||
protected internal UserProfileData m_userProfile;
|
private UserProfileData m_userProfile;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Have we received the user's inventory from the inventory service?
|
/// Have we received the user's inventory from the inventory service?
|
||||||
|
|
|
@ -173,23 +173,26 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userProfile"></param>
|
/// <param name="userProfile"></param>
|
||||||
/// <returns>true if a user profile was found to update, false otherwise</returns>
|
/// <returns>true if a user profile was found to update, false otherwise</returns>
|
||||||
public bool UpdateProfile(UserProfileData userProfile)
|
// Commented out for now. The implementation needs to be improved by protecting against race conditions,
|
||||||
{
|
// probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
|
||||||
lock (m_userProfilesById)
|
// returning a read only class from the cache).
|
||||||
{
|
// public bool UpdateProfile(UserProfileData userProfile)
|
||||||
CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
|
// {
|
||||||
|
// lock (m_userProfilesById)
|
||||||
if (userInfo != null)
|
// {
|
||||||
{
|
// CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
|
||||||
userInfo.m_userProfile = userProfile;
|
//
|
||||||
m_commsManager.UserService.UpdateUserProfile(userProfile);
|
// if (userInfo != null)
|
||||||
|
// {
|
||||||
return true;
|
// userInfo.m_userProfile = userProfile;
|
||||||
}
|
// m_commsManager.UserService.UpdateUserProfile(userProfile);
|
||||||
}
|
//
|
||||||
|
// return true;
|
||||||
return false;
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populate caches with the given user profile
|
/// Populate caches with the given user profile
|
||||||
|
|
|
@ -71,6 +71,8 @@ namespace OpenSim.Framework.Communications.Tests
|
||||||
Assert.That(existingUserInfo, Is.Not.Null, "User info not found by name");
|
Assert.That(existingUserInfo, Is.Not.Null, "User info not found by name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disabled as not fully implemented
|
||||||
[Test]
|
[Test]
|
||||||
public void TestUpdateProfile()
|
public void TestUpdateProfile()
|
||||||
{
|
{
|
||||||
|
@ -101,6 +103,7 @@ namespace OpenSim.Framework.Communications.Tests
|
||||||
Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName));
|
Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName));
|
||||||
Assert.That(userDataPlugin.GetUserByUUID(userId).SurName, Is.EqualTo(newLastName));
|
Assert.That(userDataPlugin.GetUserByUUID(userId).SurName, Is.EqualTo(newLastName));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestFetchInventory()
|
public void TestFetchInventory()
|
||||||
|
|
|
@ -156,7 +156,12 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual ulong HomeRegion
|
public virtual ulong HomeRegion
|
||||||
{
|
{
|
||||||
get { return Utils.UIntsToLong((m_homeRegionX * (uint)Constants.RegionSize), (m_homeRegionY * (uint)Constants.RegionSize)); }
|
get
|
||||||
|
{
|
||||||
|
return Utils.UIntsToLong(
|
||||||
|
m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize);
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_homeRegionX = (uint) (value >> 40);
|
m_homeRegionX = (uint) (value >> 40);
|
||||||
|
|
Loading…
Reference in New Issue