aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2017-06-09 23:27:33 +0100
committerUbitUmarov2017-06-09 23:27:33 +0100
commitbe975d1e89cbcb62f89cb7cb8367678a80cc47c6 (patch)
tree3edacaa93423d91af424c183097c56b09c8ab70a /OpenSim
parentonly silent remove threads from watch list if they stopped ( ie still conside... (diff)
downloadopensim-SC_OLD-be975d1e89cbcb62f89cb7cb8367678a80cc47c6.zip
opensim-SC_OLD-be975d1e89cbcb62f89cb7cb8367678a80cc47c6.tar.gz
opensim-SC_OLD-be975d1e89cbcb62f89cb7cb8367678a80cc47c6.tar.bz2
opensim-SC_OLD-be975d1e89cbcb62f89cb7cb8367678a80cc47c6.tar.xz
add a adicional in transit flag to signal HG tps, and use it to ignore usernames requests sent to start region during tp; don't send unknows display names ( getdisplaynames cap )
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs19
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs10
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
6 files changed, 33 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index e1b9e08..6f5775a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -1577,7 +1577,10 @@ namespace OpenSim.Region.ClientStack.Linden
1577 break; 1577 break;
1578 1578
1579 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1579 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1580 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1580 if(sp == null || sp.IsChildAgent || sp.IsDeleted)
1581 break;
1582
1583 if(sp.IsInTransit && !sp.IsInLocalTransit)
1581 break; 1584 break;
1582 1585
1583 client = sp.ControllingClient; 1586 client = sp.ControllingClient;
@@ -1699,7 +1702,10 @@ namespace OpenSim.Region.ClientStack.Linden
1699 break; 1702 break;
1700 1703
1701 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1704 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1702 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1705 if(sp == null || sp.IsChildAgent || sp.IsDeleted)
1706 break;
1707
1708 if(sp.IsInTransit && !sp.IsInLocalTransit)
1703 break; 1709 break;
1704 1710
1705 client = sp.ControllingClient; 1711 client = sp.ControllingClient;
@@ -1807,7 +1813,7 @@ namespace OpenSim.Region.ClientStack.Linden
1807 if(sp == null || sp.IsDeleted) 1813 if(sp == null || sp.IsDeleted)
1808 return ""; 1814 return "";
1809 1815
1810 if(sp.IsInTransit) 1816 if(sp.IsInTransit && !sp.IsInLocalTransit)
1811 { 1817 {
1812 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.ServiceUnavailable; 1818 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.ServiceUnavailable;
1813 httpResponse.AddHeader("Retry-After","30"); 1819 httpResponse.AddHeader("Retry-After","30");
@@ -1817,7 +1823,6 @@ namespace OpenSim.Region.ClientStack.Linden
1817 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); 1823 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
1818 string[] ids = query.GetValues("ids"); 1824 string[] ids = query.GetValues("ids");
1819 1825
1820
1821 Dictionary<UUID,string> names = m_UserManager.GetUsersNames(ids); 1826 Dictionary<UUID,string> names = m_UserManager.GetUsersNames(ids);
1822 1827
1823 OSDMap osdReply = new OSDMap(); 1828 OSDMap osdReply = new OSDMap();
@@ -1833,12 +1838,18 @@ namespace OpenSim.Region.ClientStack.Linden
1833 1838
1834 string[] parts = kvp.Value.Split(new char[] {' '}); 1839 string[] parts = kvp.Value.Split(new char[] {' '});
1835 OSDMap osdname = new OSDMap(); 1840 OSDMap osdname = new OSDMap();
1841
1842 // dont tell about unknown users, we can't send them back on Bad either
1843 if(parts[0] == "Unknown")
1844 continue;
1845/*
1836 if(parts[0] == "Unknown") 1846 if(parts[0] == "Unknown")
1837 { 1847 {
1838 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); 1848 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
1839 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); 1849 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
1840 } 1850 }
1841 else 1851 else
1852*/
1842 { 1853 {
1843 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); 1854 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
1844 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); 1855 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index f658a70..1091078 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6473,8 +6473,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6473 6473
6474 private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack) 6474 private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack)
6475 { 6475 {
6476 UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack; 6476 ScenePresence sp = (ScenePresence)SceneAgent;
6477 if(sp == null || sp.IsDeleted || (sp.IsInTransit && !sp.IsInLocalTransit))
6478 return true;
6477 6479
6480 UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
6478 6481
6479 for (int i = 0; i < upack.UUIDNameBlock.Length; i++) 6482 for (int i = 0; i < upack.UUIDNameBlock.Length; i++)
6480 { 6483 {
@@ -7493,7 +7496,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7493 SendUserInfoReply(false, true, ""); 7496 SendUserInfoReply(false, true, "");
7494 } 7497 }
7495 return true; 7498 return true;
7496
7497 } 7499 }
7498 7500
7499 private bool HandleUpdateUserInfo(IClientAPI sender, Packet Pack) 7501 private bool HandleUpdateUserInfo(IClientAPI sender, Packet Pack)
@@ -9648,6 +9650,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9648 9650
9649 private bool HandleUUIDNameRequest(IClientAPI sender, Packet Pack) 9651 private bool HandleUUIDNameRequest(IClientAPI sender, Packet Pack)
9650 { 9652 {
9653 ScenePresence sp = (ScenePresence)SceneAgent;
9654 if(sp == null || sp.IsDeleted || (sp.IsInTransit && !sp.IsInLocalTransit))
9655 return true;
9656
9651 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 9657 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
9652 9658
9653 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) 9659 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 99bebdd..c93c54d 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -771,8 +771,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
771 else if (sp.Flying) 771 else if (sp.Flying)
772 teleportFlags |= (uint)TeleportFlags.IsFlying; 772 teleportFlags |= (uint)TeleportFlags.IsFlying;
773 773
774 sp.IsInLocalTransit = finalDestination.RegionLocY != 0; // HG
774 sp.IsInTransit = true; 775 sp.IsInTransit = true;
775 776
777
776 if (DisableInterRegionTeleportCancellation) 778 if (DisableInterRegionTeleportCancellation)
777 teleportFlags |= (uint)TeleportFlags.DisableCancel; 779 teleportFlags |= (uint)TeleportFlags.DisableCancel;
778 780
@@ -1524,6 +1526,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1524 1526
1525 public bool Cross(ScenePresence agent, bool isFlying) 1527 public bool Cross(ScenePresence agent, bool isFlying)
1526 { 1528 {
1529 agent.IsInLocalTransit = true;
1527 agent.IsInTransit = true; 1530 agent.IsInTransit = true;
1528 CrossAsyncDelegate d = CrossAsync; 1531 CrossAsyncDelegate d = CrossAsync;
1529 d.BeginInvoke(agent, isFlying, CrossCompleted, d); 1532 d.BeginInvoke(agent, isFlying, CrossCompleted, d);
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 32cb5a3..2695464 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -175,6 +175,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
175 { 175 {
176 client.OnNameFromUUIDRequest -= new UUIDNameRequest(HandleUUIDNameRequest); 176 client.OnNameFromUUIDRequest -= new UUIDNameRequest(HandleUUIDNameRequest);
177 client.OnAvatarPickerRequest -= new AvatarPickerRequest(HandleAvatarPickerRequest); 177 client.OnAvatarPickerRequest -= new AvatarPickerRequest(HandleAvatarPickerRequest);
178 client.OnConnectionClosed -= new Action<IClientAPI>(HandleConnectionClosed);
178 } 179 }
179 180
180 protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client) 181 protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 93c9b42..1695d9b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -807,6 +807,7 @@ namespace OpenSim.Region.Framework.Scenes
807 foreach (avtocrossInfo avinfo in avsToCross) 807 foreach (avtocrossInfo avinfo in avsToCross)
808 { 808 {
809 ScenePresence av = avinfo.av; 809 ScenePresence av = avinfo.av;
810 av.IsInLocalTransit = true;
810 av.IsInTransit = true; 811 av.IsInTransit = true;
811 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar {0} to {1}", av.Name, val); 812 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar {0} to {1}", av.Name, val);
812 813
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index daa9e50..47af3b8 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -971,6 +971,10 @@ namespace OpenSim.Region.Framework.Scenes
971 m_inTransit = value; 971 m_inTransit = value;
972 } 972 }
973 } 973 }
974 // this is is only valid if IsInTransit is true
975 // only false on HG tps
976 // used work arounf viewers asking source region about destination user
977 public bool IsInLocalTransit {get; set; }
974 978
975 979
976 /// <summary> 980 /// <summary>
@@ -1040,6 +1044,7 @@ namespace OpenSim.Region.Framework.Scenes
1040 m_uuid = client.AgentId; 1044 m_uuid = client.AgentId;
1041 LocalId = m_scene.AllocateLocalId(); 1045 LocalId = m_scene.AllocateLocalId();
1042 LegacySitOffsets = m_scene.LegacySitOffsets; 1046 LegacySitOffsets = m_scene.LegacySitOffsets;
1047 IsInLocalTransit = true;
1043 1048
1044 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); 1049 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
1045 if (account != null) 1050 if (account != null)