also do send terrain texture change also from viewer to viewers

UbitUmarov [2024-04-28 21:57:58]
also do send terrain texture change also from viewer to viewers
Filename
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 04bfe5b..4ce0223 100755
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1772,7 +1772,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             // on to en-US to avoid number parsing issues
             Culture.SetCurrentCulture();

-            while (IsRunningInbound)
+            while (m_IsRunningInbound)
             {
                 Scene.ThreadAlive(1);
                 try
@@ -1818,7 +1818,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             // Action generic every round
             Action<IClientAPI> clientPacketHandler = ClientOutgoingPacketHandler;

-            while (base.IsRunningOutbound)
+            while (m_IsRunningOutbound)
             {
                 Scene.ThreadAlive(2);

diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 58d25d6..3bb475c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -73,13 +73,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
         public static int m_udpBuffersPoolPtr = -1;

         /// <summary>Returns true if the server is currently listening for inbound packets, otherwise false</summary>
-        public bool IsRunningInbound { get; private set; }
+        internal bool m_IsRunningInbound;
+        public bool IsRunningInbound
+        {
+            get { return m_IsRunningInbound; }
+            private set { m_IsRunningInbound = value; }
+        }
+
         public CancellationTokenSource InboundCancellationSource = new();


         /// <summary>Returns true if the server is currently sending outbound packets, otherwise false</summary>
         /// <remarks>If IsRunningOut = false, then any request to send a packet is simply dropped.</remarks>
-        public bool IsRunningOutbound { get; private set; }
+        internal bool m_IsRunningOutbound;
+        public bool IsRunningOutbound
+        {
+            get { return m_IsRunningOutbound; }
+            private set { m_IsRunningOutbound = value; }
+        }

         /// <summary>
         /// Number of UDP receives.
@@ -179,19 +190,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
         /// the UDP socket. This value is passed up to the operating system
         /// and used in the system networking stack. Use zero to leave this
         /// value as the default</param>
-        /// <param name="asyncPacketHandling">Set this to true to start
-        /// receiving more packets while current packet handler callbacks are
-        /// still running. Setting this to false will complete each packet
-        /// callback before the next packet is processed</param>
-        /// <remarks>This method will attempt to set the SIO_UDP_CONNRESET flag
-        /// on the socket to get newer versions of Windows to behave in a sane
-        /// manner (not throwing an exception when the remote side resets the
-        /// connection). This call is ignored on Mono where the flag is not
-        /// necessary</remarks>
+

         public virtual void StartInbound(int recvBufferSize)
         {
-            if (!IsRunningInbound)
+            if (!m_IsRunningInbound)
             {
                 m_log.DebugFormat("[UDPBASE]: Starting inbound UDP loop");

@@ -242,7 +245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 if (m_udpPort == 0)
                     m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;

-                IsRunningInbound = true;
+                m_IsRunningInbound = true;

                 // kick start the receiver tasks dance.
                 Task.Run(AsyncBeginReceive).ConfigureAwait(false);
@@ -256,16 +259,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
         {
             m_log.DebugFormat("[UDPBASE]: Starting outbound UDP loop");

-            IsRunningOutbound = true;
+            m_IsRunningOutbound = true;
         }

         public virtual void StopInbound()
         {
-            if (IsRunningInbound)
+            if (m_IsRunningInbound)
             {
                 m_log.DebugFormat("[UDPBASE]: Stopping inbound UDP loop");

-                IsRunningInbound = false;
+                m_IsRunningInbound = false;
                 InboundCancellationSource.Cancel();
                 m_udpSocket.Close();
                 m_udpSocket = null;
@@ -276,20 +279,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
         {
             m_log.DebugFormat("[UDPBASE]: Stopping outbound UDP loop");

-            IsRunningOutbound = false;
+            m_IsRunningOutbound = false;
         }

         private async void AsyncBeginReceive()
         {
             SocketAddress workSktAddress = new(m_udpSocket.AddressFamily);
-            while (IsRunningInbound)
+            while (m_IsRunningInbound)
             {
                 UDPPacketBuffer buf = GetNewUDPBuffer(null); // we need a fresh one here, for now at least
                 try
                 {
                     int nbytes =
                         await m_udpSocket.ReceiveFromAsync(buf.Data.AsMemory(), SocketFlags.None, workSktAddress, InboundCancellationSource.Token).ConfigureAwait(false);
-                    if (!IsRunningInbound)
+                    if (!m_IsRunningInbound)
                     {
                         FreeUDPBuffer(buf);
                         return;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 7b72879..81395b0 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -229,7 +229,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
         public void setEstateTerrainBaseTexture(int level, UUID texture)
         {
             SetEstateTerrainBaseTexture(null, level, texture);
-            sendRegionHandshakeToAll();
         }

         public void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue)
@@ -560,7 +559,7 @@ namespace OpenSim.Region.CoreModules.World.Estate

             Scene.RegionInfo.RegionSettings.Save();
             TriggerRegionInfoChange();
-            SendRegionInfoPacketToAll();
+            sendRegionHandshakeToAll();
         }

         public void SetEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
@@ -588,7 +587,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
             Scene.RegionInfo.RegionSettings.Save();
             TriggerRegionInfoChange();
             sendRegionHandshakeToAll();
-//            sendRegionInfoPacketToAll();
         }

         private void HandleCommitEstateTerrainTextureRequest(IClientAPI remoteClient)
ViewGit