Put a scope un users. Should fix Unknown UserUMMAU43 unless the user IS unknown

0.9.1.0-post-fixes
Melanie Thielker 2019-08-07 18:19:56 +01:00
parent ba680ceecb
commit c3e74d9e04
6 changed files with 29 additions and 3 deletions

1
OpenSim/Framework/IClientAPI.cs Normal file → Executable file
View File

@ -712,6 +712,7 @@ namespace OpenSim.Framework
UUID AgentId { get; }
UUID ScopeId { get; }
/// <summary>
/// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
/// is connected).

6
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs Normal file → Executable file
View File

@ -331,6 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private readonly UUID m_sessionId;
private readonly UUID m_secureSessionId;
protected readonly UUID m_agentId;
protected readonly UUID m_scopeId;
private readonly uint m_circuitCode;
private readonly byte[] m_regionChannelVersion = Utils.EmptyBytes;
private readonly IGroupsModule m_GroupsModule;
@ -419,6 +420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
public UUID AgentId { get { return m_agentId; } }
public UUID ScopeId { get { return m_scopeId; } }
public ISceneAgent SceneAgent { get; set; }
public UUID ActiveGroupId { get { return m_activeGroupID; } set { m_activeGroupID = value; } }
public string ActiveGroupName { get { return m_activeGroupName; } set { m_activeGroupName = value; } }
@ -552,6 +554,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_prioritizer = new Prioritizer(m_scene);
// Pick up agent scope which, for gods, can be different from the region scope
IUserAccountService userAccountService = m_scene.RequestModuleInterface<IUserAccountService>();
var myself = userAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_agentId);
RegisterLocalPacketHandlers();
string name = string.Format("AsyncInUDP-{0}",m_agentId.ToString());
m_asyncPacketProcess = new JobEngine(name, name, 10000);

View File

@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
// instead drop the request entirely.
if(!client.IsActive)
return;
if (GetUser(uuid, out user))
if (GetUser(uuid, client.ScopeId, out user))
{
if(client.IsActive)
client.SendNameReply(uuid, user.FirstName, user.LastName);
@ -716,7 +716,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
#region Cache Management
public virtual bool GetUser(UUID uuid, out UserData userdata)
{
if(m_Scenes.Count <= 0)
return GetUser(uuid, m_Scenes[0].RegionInfo.ScopeID, out userdata);
}
public virtual bool GetUser(UUID uuid, UUID scopeID, out UserData userdata)
{
if (m_Scenes.Count <= 0)
{
userdata = new UserData();
return false;
@ -749,7 +754,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
if (!userdata.HasGridUserTried)
{
/* rewrite here */
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid);
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(scopeID, uuid);
if (account != null)
{
userdata.FirstName = account.FirstName;

View File

@ -542,6 +542,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
get { return m_agentID; }
}
public UUID ScopeId { get { return UUID.Zero; } }
public void Disconnect(string reason)
{
IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")");

7
OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs Normal file → Executable file
View File

@ -67,6 +67,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
private readonly Vector3 m_startPos;
private UUID m_uuid = UUID.Random();
private readonly Scene m_scene;
private readonly UUID m_scopeID;
private readonly UUID m_ownerID;
private UUID m_hostGroupID;
private string m_profileAbout = "";
@ -82,6 +83,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
m_startPos = position;
m_uuid = UUID.Random();
m_scene = scene;
m_scopeID = scene.RegionInfo.ScopeID;
m_ownerID = ownerID;
SenseAsAgent = senseAsAgent;
m_hostGroupID = UUID.Zero;
@ -123,6 +125,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
get { return m_scene; }
}
public UUID ScopeId
{
get { return m_scopeID; }
}
public int PingTimeMS { get { return 0; } }
public UUID OwnerID

5
OpenSim/Tests/Common/Mock/TestClient.cs Normal file → Executable file
View File

@ -453,6 +453,11 @@ namespace OpenSim.Tests.Common
get { return m_scene; }
}
public UUID ScopeId
{
get { return UUID.Zero; }
}
public bool SendLogoutPacketWhenClosing
{
set { }