diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
4 files changed, 85 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ed14c12..ef5239a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -56,6 +56,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
56 | public const int DefaultMaxTransferDistance = 4095; | 56 | public const int DefaultMaxTransferDistance = 4095; |
57 | public const bool WaitForAgentArrivedAtDestinationDefault = true; | 57 | public const bool WaitForAgentArrivedAtDestinationDefault = true; |
58 | 58 | ||
59 | public string OutgoingTransferVersionName { get; set; } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Determine the maximum entity transfer version we will use for teleports. | ||
63 | /// </summary> | ||
64 | public float MaxOutgoingTransferVersion { get; set; } | ||
65 | |||
59 | /// <summary> | 66 | /// <summary> |
60 | /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. | 67 | /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. |
61 | /// </summary> | 68 | /// </summary> |
@@ -151,9 +158,39 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
151 | /// <param name="source"></param> | 158 | /// <param name="source"></param> |
152 | protected virtual void InitialiseCommon(IConfigSource source) | 159 | protected virtual void InitialiseCommon(IConfigSource source) |
153 | { | 160 | { |
161 | string transferVersionName = "SIMULATION"; | ||
162 | float maxTransferVersion = 0.2f; | ||
163 | |||
154 | IConfig transferConfig = source.Configs["EntityTransfer"]; | 164 | IConfig transferConfig = source.Configs["EntityTransfer"]; |
155 | if (transferConfig != null) | 165 | if (transferConfig != null) |
156 | { | 166 | { |
167 | string rawVersion | ||
168 | = transferConfig.GetString( | ||
169 | "MaxOutgoingTransferVersion", | ||
170 | string.Format("{0}/{1}", transferVersionName, maxTransferVersion)); | ||
171 | |||
172 | string[] rawVersionComponents = rawVersion.Split(new char[] { '/' }); | ||
173 | |||
174 | bool versionValid = false; | ||
175 | |||
176 | if (rawVersionComponents.Length >= 2) | ||
177 | versionValid = float.TryParse(rawVersionComponents[1], out maxTransferVersion); | ||
178 | |||
179 | if (!versionValid) | ||
180 | { | ||
181 | m_log.ErrorFormat( | ||
182 | "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion {0} is invalid, using {1}", | ||
183 | rawVersion, string.Format("{0}/{1}", transferVersionName, maxTransferVersion)); | ||
184 | } | ||
185 | else | ||
186 | { | ||
187 | transferVersionName = rawVersionComponents[0]; | ||
188 | |||
189 | m_log.InfoFormat( | ||
190 | "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion set to {0}", | ||
191 | string.Format("{0}/{1}", transferVersionName, maxTransferVersion)); | ||
192 | } | ||
193 | |||
157 | DisableInterRegionTeleportCancellation | 194 | DisableInterRegionTeleportCancellation |
158 | = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); | 195 | = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); |
159 | 196 | ||
@@ -167,6 +204,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
167 | MaxTransferDistance = DefaultMaxTransferDistance; | 204 | MaxTransferDistance = DefaultMaxTransferDistance; |
168 | } | 205 | } |
169 | 206 | ||
207 | OutgoingTransferVersionName = transferVersionName; | ||
208 | MaxOutgoingTransferVersion = maxTransferVersion; | ||
209 | |||
170 | m_entityTransferStateMachine = new EntityTransferStateMachine(this); | 210 | m_entityTransferStateMachine = new EntityTransferStateMachine(this); |
171 | 211 | ||
172 | m_Enabled = true; | 212 | m_Enabled = true; |
@@ -522,6 +562,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
522 | /// </returns> | 562 | /// </returns> |
523 | private bool IsWithinMaxTeleportDistance(RegionInfo sourceRegion, GridRegion destRegion) | 563 | private bool IsWithinMaxTeleportDistance(RegionInfo sourceRegion, GridRegion destRegion) |
524 | { | 564 | { |
565 | if(MaxTransferDistance == 0) | ||
566 | return true; | ||
567 | |||
525 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); | 568 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); |
526 | // | 569 | // |
527 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", | 570 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", |
@@ -623,7 +666,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
623 | if (!sp.ValidateAttachments()) | 666 | if (!sp.ValidateAttachments()) |
624 | m_log.DebugFormat( | 667 | m_log.DebugFormat( |
625 | "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.", | 668 | "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.", |
626 | sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName); | 669 | sp.Name, sp.Scene.Name, finalDestination.RegionName); |
627 | 670 | ||
628 | string reason; | 671 | string reason; |
629 | string version; | 672 | string version; |
@@ -634,7 +677,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
634 | 677 | ||
635 | m_log.DebugFormat( | 678 | m_log.DebugFormat( |
636 | "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}", | 679 | "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}", |
637 | sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason); | 680 | sp.Name, sp.Scene.Name, finalDestination.RegionName, reason); |
638 | 681 | ||
639 | return; | 682 | return; |
640 | } | 683 | } |
@@ -644,7 +687,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
644 | // as server attempts. | 687 | // as server attempts. |
645 | m_interRegionTeleportAttempts.Value++; | 688 | m_interRegionTeleportAttempts.Value++; |
646 | 689 | ||
647 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Destination is running version {0}", version); | 690 | m_log.DebugFormat( |
691 | "[ENTITY TRANSFER MODULE]: {0} max transfer version is {1}/{2}, {3} max version is {4}", | ||
692 | sp.Scene.Name, OutgoingTransferVersionName, MaxOutgoingTransferVersion, finalDestination.RegionName, version); | ||
648 | 693 | ||
649 | // Fixing a bug where teleporting while sitting results in the avatar ending up removed from | 694 | // Fixing a bug where teleporting while sitting results in the avatar ending up removed from |
650 | // both regions | 695 | // both regions |
@@ -691,7 +736,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
691 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | 736 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); |
692 | } | 737 | } |
693 | 738 | ||
694 | if (version.Equals("SIMULATION/0.2")) | 739 | // We're going to fallback to V1 if the destination gives us anything smaller than 0.2 or we're forcing |
740 | // use of the earlier protocol | ||
741 | float versionNumber = 0.1f; | ||
742 | string[] versionComponents = version.Split(new char[] { '/' }); | ||
743 | if (versionComponents.Length >= 2) | ||
744 | float.TryParse(versionComponents[1], out versionNumber); | ||
745 | |||
746 | if (versionNumber == 0.2f && MaxOutgoingTransferVersion >= versionNumber) | ||
695 | TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); | 747 | TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); |
696 | else | 748 | else |
697 | TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); | 749 | TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); |
@@ -925,7 +977,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
925 | 977 | ||
926 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 978 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
927 | { | 979 | { |
928 | if (!sp.Scene.IncomingPreCloseAgent(sp)) | 980 | if (!sp.Scene.IncomingPreCloseClient(sp)) |
929 | return; | 981 | return; |
930 | 982 | ||
931 | // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before | 983 | // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before |
@@ -936,7 +988,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
936 | // an agent cannot teleport back to this region if it has teleported away. | 988 | // an agent cannot teleport back to this region if it has teleported away. |
937 | Thread.Sleep(2000); | 989 | Thread.Sleep(2000); |
938 | 990 | ||
939 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 991 | sp.Scene.CloseAgent(sp.UUID, false); |
940 | } | 992 | } |
941 | else | 993 | else |
942 | { | 994 | { |
@@ -1090,7 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1090 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | 1142 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone |
1091 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 1143 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
1092 | { | 1144 | { |
1093 | if (!sp.Scene.IncomingPreCloseAgent(sp)) | 1145 | if (!sp.Scene.IncomingPreCloseClient(sp)) |
1094 | return; | 1146 | return; |
1095 | 1147 | ||
1096 | // RED ALERT!!!! | 1148 | // RED ALERT!!!! |
@@ -1107,7 +1159,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1107 | m_log.DebugFormat( | 1159 | m_log.DebugFormat( |
1108 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); | 1160 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); |
1109 | 1161 | ||
1110 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1162 | sp.Scene.CloseAgent(sp.UUID, false); |
1111 | } | 1163 | } |
1112 | else | 1164 | else |
1113 | { | 1165 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 1cf1884..74b834a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
181 | if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) | 181 | if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) |
182 | { | 182 | { |
183 | string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); | 183 | string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); |
184 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); | 184 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); |
185 | Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); | 185 | Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); |
186 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url); | 186 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url); |
187 | uuidGatherer.GatherAssetUuids(so, ids); | 187 | uuidGatherer.GatherAssetUuids(so, ids); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 89bb037..3feeb13 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -906,6 +906,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
906 | m_log.Debug("[INVENTORY ACCESS MODULE]: Object has UUID.Zero! Position 3"); | 906 | m_log.Debug("[INVENTORY ACCESS MODULE]: Object has UUID.Zero! Position 3"); |
907 | } | 907 | } |
908 | 908 | ||
909 | // if this was previously an attachment and is now being rezzed, | ||
910 | // save the old attachment info. | ||
911 | if (group.IsAttachment == false && group.RootPart.Shape.State != 0) | ||
912 | { | ||
913 | group.RootPart.AttachedPos = group.AbsolutePosition; | ||
914 | group.RootPart.Shape.LastAttachPoint = (byte)group.AttachmentPoint; | ||
915 | } | ||
916 | |||
909 | foreach (SceneObjectPart part in group.Parts) | 917 | foreach (SceneObjectPart part in group.Parts) |
910 | { | 918 | { |
911 | // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset. | 919 | // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset. |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 8c983e6..d3926cc 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -178,17 +178,20 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
178 | m_ServiceThrottle.Enqueue("name", uuid.ToString(), delegate | 178 | m_ServiceThrottle.Enqueue("name", uuid.ToString(), delegate |
179 | { | 179 | { |
180 | //m_log.DebugFormat("[YYY]: Name request {0}", uuid); | 180 | //m_log.DebugFormat("[YYY]: Name request {0}", uuid); |
181 | bool foundRealName = TryGetUserNames(uuid, names); | ||
182 | |||
183 | if (names.Length == 2) | ||
184 | { | ||
185 | if (!foundRealName) | ||
186 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], uuid, client.Name); | ||
187 | 181 | ||
182 | // As least upto September 2013, clients permanently cache UUID -> Name bindings. Some clients | ||
183 | // appear to clear this when the user asks it to clear the cache, but others may not. | ||
184 | // | ||
185 | // So to avoid clients | ||
186 | // (particularly Hypergrid clients) permanently binding "Unknown User" to a given UUID, we will | ||
187 | // instead drop the request entirely. | ||
188 | if (TryGetUserNames(uuid, names)) | ||
188 | client.SendNameReply(uuid, names[0], names[1]); | 189 | client.SendNameReply(uuid, names[0], names[1]); |
189 | } | 190 | // else |
191 | // m_log.DebugFormat( | ||
192 | // "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}", | ||
193 | // uuid, client.Name); | ||
190 | }); | 194 | }); |
191 | |||
192 | } | 195 | } |
193 | } | 196 | } |
194 | 197 | ||
@@ -391,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
391 | } | 394 | } |
392 | 395 | ||
393 | names[0] = "Unknown"; | 396 | names[0] = "Unknown"; |
394 | names[1] = "UserUMMTGUN8"; | 397 | names[1] = "UserUMMTGUN9"; |
395 | 398 | ||
396 | return false; | 399 | return false; |
397 | } | 400 | } |
@@ -539,7 +542,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
539 | AddUser(uuid, homeURL + ";" + first + " " + last); | 542 | AddUser(uuid, homeURL + ";" + first + " " + last); |
540 | } | 543 | } |
541 | 544 | ||
542 | public void AddUser (UUID id, string creatorData) | 545 | public void AddUser(UUID id, string creatorData) |
543 | { | 546 | { |
544 | //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); | 547 | //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); |
545 | 548 | ||
@@ -599,6 +602,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
599 | user.LastName = "@unknown"; | 602 | user.LastName = "@unknown"; |
600 | } | 603 | } |
601 | } | 604 | } |
605 | |||
602 | if (parts.Length >= 2) | 606 | if (parts.Length >= 2) |
603 | user.FirstName = parts[1].Replace(' ', '.'); | 607 | user.FirstName = parts[1].Replace(' ', '.'); |
604 | } | 608 | } |
@@ -611,7 +615,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
611 | user.FirstName = "Unknown"; | 615 | user.FirstName = "Unknown"; |
612 | user.LastName = "UserUMMAU4"; | 616 | user.LastName = "UserUMMAU4"; |
613 | } | 617 | } |
614 | 618 | ||
615 | AddUserInternal(user); | 619 | AddUserInternal(user); |
616 | } | 620 | } |
617 | } | 621 | } |
@@ -639,6 +643,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
639 | 643 | ||
640 | protected void Init() | 644 | protected void Init() |
641 | { | 645 | { |
646 | AddUser(UUID.Zero, "Unknown", "User"); | ||
642 | RegisterConsoleCmds(); | 647 | RegisterConsoleCmds(); |
643 | } | 648 | } |
644 | 649 | ||