From 8c41271b3312f2a02608ffc41b220f7fb018d6ad Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 13 Oct 2014 13:17:48 +0100 Subject: *TEST* send udp sync. Stop uncontroled and hidden use of IO threads. Testing this may require several people. --- .../Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 881e768..1d76c14 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -375,12 +375,28 @@ namespace OpenMetaverse // Synchronous mode waits until the packet callback completes // before starting the receive to fetch another packet - if (!m_asyncPacketHandling) +// if (!m_asyncPacketHandling) AsyncBeginReceive(); } } } + public void SyncSend(UDPPacketBuffer buf) + { + try + { + m_udpSocket.SendTo( + buf.Data, + 0, + buf.DataLength, + SocketFlags.None, + buf.RemoteEndPoint + ); + } + catch (SocketException) { } + catch (ObjectDisposedException) { } + } + public void AsyncBeginSend(UDPPacketBuffer buf) { // if (IsRunningOutbound) -- cgit v1.1 From 12ebc92e55efbe08616506d7f543c3c9ed88de43 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 13 Oct 2014 23:52:19 +0200 Subject: Revert "*TEST* send udp sync. Stop uncontroled and hidden use of IO threads." This reverts commit 8c41271b3312f2a02608ffc41b220f7fb018d6ad. Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs --- .../Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 1d76c14..881e768 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -375,28 +375,12 @@ namespace OpenMetaverse // Synchronous mode waits until the packet callback completes // before starting the receive to fetch another packet -// if (!m_asyncPacketHandling) + if (!m_asyncPacketHandling) AsyncBeginReceive(); } } } - public void SyncSend(UDPPacketBuffer buf) - { - try - { - m_udpSocket.SendTo( - buf.Data, - 0, - buf.DataLength, - SocketFlags.None, - buf.RemoteEndPoint - ); - } - catch (SocketException) { } - catch (ObjectDisposedException) { } - } - public void AsyncBeginSend(UDPPacketBuffer buf) { // if (IsRunningOutbound) -- cgit v1.1 From 54ab9e7d4dd04042cb36b292c3896d20f3df8060 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 30 Oct 2014 21:57:20 +0000 Subject: set udp SocketOptionName.ReuseAddress to false, to not allow two regions to bind to same port, as seems to be possible at least with mono 3.2.8, same as patch just pushed to core by justin. This is not necessary on windows, possible a bug on some mono versions. --- OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 881e768..a09195c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -152,6 +152,8 @@ namespace OpenMetaverse SocketType.Dgram, ProtocolType.Udp); + m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); + try { // This udp socket flag is not supported under mono, -- cgit v1.1 From 785a2cc729a9935a6a68a33ce2b7df107f40e918 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 10 Nov 2014 04:48:36 +0100 Subject: Remove JustinCCs UDP patch - it is harmful to Avination's grid management --- OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index a09195c..0030dee 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -152,7 +152,9 @@ namespace OpenMetaverse SocketType.Dgram, ProtocolType.Udp); - m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); + // OpenSim may need this but in AVN, this messes up automated + // sim restarts badly + //m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); try { @@ -416,4 +418,4 @@ namespace OpenMetaverse catch (ObjectDisposedException) { } } } -} \ No newline at end of file +} -- cgit v1.1