Try caching the user name for a new agent earlier on in the process of establishing a connection, to see if this helps with "Unknown UserUMMTGUN" issues.

The UMMTGUN form of Unknown User seems to appear because a viewer sometimes sends a UUIDNameRequest UDP request that fails to find a binding.
However, in theory the incoming agent should have made that binding before any such request is triggered.
So moving this binding to an earlier point in the process to see if this makes a difference.
Unknown user name is also updated to UserUMMTGUN2 - if you see the old name then you need to clear your viewer cache.
This relates to http://opensimulator.org/mantis/view.php?id=6625
cpu-performance
Justin Clark-Casey (justincc) 2013-05-29 23:08:54 +01:00
parent f9ee9efb97
commit cc7aa88b26
3 changed files with 11 additions and 5 deletions

View File

@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests
public void TestCachedUserNameForNewAgent()
{
TestHelpers.InMethod();
TestHelpers.EnableLogging();
// TestHelpers.EnableLogging();
HGUserManagementModule hgumm = new HGUserManagementModule();
UUID userId = TestHelpers.ParseStem("11");

View File

@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
else
{
names[0] = "Unknown";
names[1] = "UserUMMTGUN";
names[1] = "UserUMMTGUN2";
return false;
}

View File

@ -2847,7 +2847,9 @@ namespace OpenSim.Region.Framework.Scenes
// client is for a root or child agent.
client.SceneAgent = sp;
// Cache the user's name
// This is currently also being done earlier in NewUserConnection for real users to see if this
// resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other
// places. However, we still need to do it here for NPCs.
CacheUserName(sp, aCircuit);
EventManager.TriggerOnNewClient(client);
@ -2871,7 +2873,7 @@ namespace OpenSim.Region.Framework.Scenes
{
string first = aCircuit.firstname, last = aCircuit.lastname;
if (sp.PresenceType == PresenceType.Npc)
if (sp != null && sp.PresenceType == PresenceType.Npc)
{
UserManagementModule.AddUser(aCircuit.AgentID, first, last);
}
@ -3766,8 +3768,12 @@ namespace OpenSim.Region.Framework.Scenes
CapsModule.SetAgentCapsSeeds(agent);
}
}
}
// Try caching an incoming user name much earlier on to see if this helps with an issue
// where HG users are occasionally seen by others as "Unknown User" because their UUIDName
// request for the HG avatar appears to trigger before the user name is cached.
CacheUserName(null, agent);
}
if (vialogin)
{