* refactor: Move error logging from GetUserDetails up to callers, since there are some circumstances in which not finding a user is not an error
parent
9c4d868167
commit
9324c3f110
|
@ -75,6 +75,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
if (userID == UUID.Zero)
|
||||
return;
|
||||
|
||||
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
||||
GetUserDetails(userID);
|
||||
}
|
||||
|
@ -133,8 +134,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the details of the given user. A caller should try this method first if it isn't sure that
|
||||
/// a user profile exists for the given user.
|
||||
/// Get cached details of the given user. If the user isn't in cache then the user is requested from the
|
||||
/// profile service.
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <returns>null if no user details are found</returns>
|
||||
|
@ -160,7 +161,6 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found.", userID);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5044,7 +5044,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
|
||||
if (userInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[CLIENT]: Could not resolve user {0} for caps inventory update",
|
||||
AgentId);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (userInfo.RootFolder == null)
|
||||
break;
|
||||
|
|
|
@ -244,6 +244,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
|
|||
|
||||
userInfo.UpdateItem(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ASSET TRANSACTIONS]: Could not find user {0} for inventory item update",
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,6 +300,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
|
|||
userInfo.AddItem(item);
|
||||
ourClient.SendInventoryItemCreateUpdate(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ASSET TRANSACTIONS]: Could not find user {0} for inventory item creation",
|
||||
ourClient.AgentId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -604,6 +604,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
|||
string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
|
||||
return avatarname;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[MONEY]: Could not resolve user {0}",
|
||||
agentID);
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -259,6 +259,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
if (profile.UserProfile.GodLevel >= 200)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -646,8 +650,13 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
{
|
||||
CachedUserInfo userInfo =
|
||||
scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
|
||||
|
||||
if (userInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for edit notecard check", user);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (userInfo.RootFolder == null)
|
||||
return false;
|
||||
|
@ -1024,8 +1033,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
{
|
||||
CachedUserInfo userInfo =
|
||||
scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
|
||||
|
||||
if (userInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (userInfo.RootFolder == null)
|
||||
return false;
|
||||
|
@ -1102,8 +1115,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
{
|
||||
CachedUserInfo userInfo =
|
||||
scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
|
||||
|
||||
if (userInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for view notecard check", user);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (userInfo.RootFolder == null)
|
||||
return false;
|
||||
|
|
|
@ -143,6 +143,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
AddInventoryItem(remoteClient.AgentId, item);
|
||||
remoteClient.SendInventoryItemCreateUpdate(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[AGENT INVENTORY]: Could not resolve user {0} for adding an inventory item",
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -194,6 +200,13 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[AGENT INVENTORY]: Could not resolve user {0} for caps inventory update",
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue