aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2019-08-07 18:19:56 +0100
committerMelanie Thielker2019-08-07 18:22:13 +0100
commitc3e74d9e044618b012f38d3d00aeac2dd212bf45 (patch)
treea0cc2d65ae2e099e66b60863d943ab8ec9f7c0ca /OpenSim
parentMerge branch 'master' of brain.opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-c3e74d9e044618b012f38d3d00aeac2dd212bf45.zip
opensim-SC-c3e74d9e044618b012f38d3d00aeac2dd212bf45.tar.gz
opensim-SC-c3e74d9e044618b012f38d3d00aeac2dd212bf45.tar.bz2
opensim-SC-c3e74d9e044618b012f38d3d00aeac2dd212bf45.tar.xz
Put a scope un users. Should fix Unknown UserUMMAU43 unless the user IS unknown
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--]OpenSim/Framework/IClientAPI.cs1
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs6
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs11
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs7
-rwxr-xr-x[-rw-r--r--]OpenSim/Tests/Common/Mock/TestClient.cs5
6 files changed, 29 insertions, 3 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 68ca52e..da964e7 100644..100755
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -712,6 +712,7 @@ namespace OpenSim.Framework
712 712
713 UUID AgentId { get; } 713 UUID AgentId { get; }
714 714
715 UUID ScopeId { get; }
715 /// <summary> 716 /// <summary>
716 /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it 717 /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
717 /// is connected). 718 /// is connected).
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index aeb728e..31f08af 100644..100755
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -331,6 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
331 private readonly UUID m_sessionId; 331 private readonly UUID m_sessionId;
332 private readonly UUID m_secureSessionId; 332 private readonly UUID m_secureSessionId;
333 protected readonly UUID m_agentId; 333 protected readonly UUID m_agentId;
334 protected readonly UUID m_scopeId;
334 private readonly uint m_circuitCode; 335 private readonly uint m_circuitCode;
335 private readonly byte[] m_regionChannelVersion = Utils.EmptyBytes; 336 private readonly byte[] m_regionChannelVersion = Utils.EmptyBytes;
336 private readonly IGroupsModule m_GroupsModule; 337 private readonly IGroupsModule m_GroupsModule;
@@ -419,6 +420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
419 } 420 }
420 } 421 }
421 public UUID AgentId { get { return m_agentId; } } 422 public UUID AgentId { get { return m_agentId; } }
423 public UUID ScopeId { get { return m_scopeId; } }
422 public ISceneAgent SceneAgent { get; set; } 424 public ISceneAgent SceneAgent { get; set; }
423 public UUID ActiveGroupId { get { return m_activeGroupID; } set { m_activeGroupID = value; } } 425 public UUID ActiveGroupId { get { return m_activeGroupID; } set { m_activeGroupID = value; } }
424 public string ActiveGroupName { get { return m_activeGroupName; } set { m_activeGroupName = value; } } 426 public string ActiveGroupName { get { return m_activeGroupName; } set { m_activeGroupName = value; } }
@@ -552,6 +554,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
552 554
553 m_prioritizer = new Prioritizer(m_scene); 555 m_prioritizer = new Prioritizer(m_scene);
554 556
557 // Pick up agent scope which, for gods, can be different from the region scope
558 IUserAccountService userAccountService = m_scene.RequestModuleInterface<IUserAccountService>();
559 var myself = userAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_agentId);
560
555 RegisterLocalPacketHandlers(); 561 RegisterLocalPacketHandlers();
556 string name = string.Format("AsyncInUDP-{0}",m_agentId.ToString()); 562 string name = string.Format("AsyncInUDP-{0}",m_agentId.ToString());
557 m_asyncPacketProcess = new JobEngine(name, name, 10000); 563 m_asyncPacketProcess = new JobEngine(name, name, 10000);
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 40b83f3..3baf03d 100644..100755
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
219 // instead drop the request entirely. 219 // instead drop the request entirely.
220 if(!client.IsActive) 220 if(!client.IsActive)
221 return; 221 return;
222 if (GetUser(uuid, out user)) 222 if (GetUser(uuid, client.ScopeId, out user))
223 { 223 {
224 if(client.IsActive) 224 if(client.IsActive)
225 client.SendNameReply(uuid, user.FirstName, user.LastName); 225 client.SendNameReply(uuid, user.FirstName, user.LastName);
@@ -716,7 +716,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
716 #region Cache Management 716 #region Cache Management
717 public virtual bool GetUser(UUID uuid, out UserData userdata) 717 public virtual bool GetUser(UUID uuid, out UserData userdata)
718 { 718 {
719 if(m_Scenes.Count <= 0) 719 return GetUser(uuid, m_Scenes[0].RegionInfo.ScopeID, out userdata);
720 }
721
722 public virtual bool GetUser(UUID uuid, UUID scopeID, out UserData userdata)
723 {
724 if (m_Scenes.Count <= 0)
720 { 725 {
721 userdata = new UserData(); 726 userdata = new UserData();
722 return false; 727 return false;
@@ -749,7 +754,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
749 if (!userdata.HasGridUserTried) 754 if (!userdata.HasGridUserTried)
750 { 755 {
751 /* rewrite here */ 756 /* rewrite here */
752 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid); 757 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(scopeID, uuid);
753 if (account != null) 758 if (account != null)
754 { 759 {
755 userdata.FirstName = account.FirstName; 760 userdata.FirstName = account.FirstName;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index e27bbc3..002bfad 100644..100755
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -542,6 +542,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
542 get { return m_agentID; } 542 get { return m_agentID; }
543 } 543 }
544 544
545 public UUID ScopeId { get { return UUID.Zero; } }
546
545 public void Disconnect(string reason) 547 public void Disconnect(string reason)
546 { 548 {
547 IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")"); 549 IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")");
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index d3eb25f..798576c 100644..100755
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -67,6 +67,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
67 private readonly Vector3 m_startPos; 67 private readonly Vector3 m_startPos;
68 private UUID m_uuid = UUID.Random(); 68 private UUID m_uuid = UUID.Random();
69 private readonly Scene m_scene; 69 private readonly Scene m_scene;
70 private readonly UUID m_scopeID;
70 private readonly UUID m_ownerID; 71 private readonly UUID m_ownerID;
71 private UUID m_hostGroupID; 72 private UUID m_hostGroupID;
72 private string m_profileAbout = ""; 73 private string m_profileAbout = "";
@@ -82,6 +83,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
82 m_startPos = position; 83 m_startPos = position;
83 m_uuid = UUID.Random(); 84 m_uuid = UUID.Random();
84 m_scene = scene; 85 m_scene = scene;
86 m_scopeID = scene.RegionInfo.ScopeID;
85 m_ownerID = ownerID; 87 m_ownerID = ownerID;
86 SenseAsAgent = senseAsAgent; 88 SenseAsAgent = senseAsAgent;
87 m_hostGroupID = UUID.Zero; 89 m_hostGroupID = UUID.Zero;
@@ -123,6 +125,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
123 get { return m_scene; } 125 get { return m_scene; }
124 } 126 }
125 127
128 public UUID ScopeId
129 {
130 get { return m_scopeID; }
131 }
132
126 public int PingTimeMS { get { return 0; } } 133 public int PingTimeMS { get { return 0; } }
127 134
128 public UUID OwnerID 135 public UUID OwnerID
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fd14291..6cea71f 100644..100755
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -453,6 +453,11 @@ namespace OpenSim.Tests.Common
453 get { return m_scene; } 453 get { return m_scene; }
454 } 454 }
455 455
456 public UUID ScopeId
457 {
458 get { return UUID.Zero; }
459 }
460
456 public bool SendLogoutPacketWhenClosing 461 public bool SendLogoutPacketWhenClosing
457 { 462 {
458 set { } 463 set { }