From 31fafb0432c8f2f2e765b0d74e587e88098f1816 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 3 Apr 2024 16:43:12 -0400 Subject: [PATCH] ensure these announcements are always sent with stream ID 0; --- FnePeer.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/FnePeer.cs b/FnePeer.cs index dfb9992..0a587d5 100644 --- a/FnePeer.cs +++ b/FnePeer.cs @@ -232,9 +232,10 @@ namespace fnecore /// Byte array containing message to send /// RTP Packet Sequence /// - public void SendMaster(Tuple opcode, byte[] message, ushort pktSeq, uint streamId = 0) + /// + public void SendMaster(Tuple opcode, byte[] message, ushort pktSeq, uint streamId = 0, bool forceZeroStream = false) { - if (streamId == 0) + if (streamId == 0 && !forceZeroStream) streamId = this.streamId; Send(new UdpFrame() @@ -267,7 +268,7 @@ namespace fnecore FneUtils.Write3Bytes(srcId, ref res, 0); FneUtils.Write3Bytes(dstId, ref res, 3); - SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_GRP_AFFIL), res, 0); + SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_GRP_AFFIL), res, 0, 0, true); } /// @@ -281,7 +282,7 @@ namespace fnecore FneUtils.Write3Bytes(srcId, ref res, 0); - SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_UNIT_REG), res, 0); + SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_UNIT_REG), res, 0, 0, true); } /// @@ -295,7 +296,7 @@ namespace fnecore FneUtils.Write3Bytes(srcId, ref res, 0); - SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_UNIT_DEREG), res, 0); + SendMaster(CreateOpcode(Constants.NET_FUNC_TRANSFER, Constants.NET_ANNC_SUBFUNC_UNIT_DEREG), res, 0, 0, true); } ///