Fixed some crashes regaring NIP.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m10s

This commit is contained in:
feyris-tan 2025-12-13 19:09:12 +01:00
parent 3668cad724
commit 86b07b4ad6
6 changed files with 18 additions and 7 deletions

View File

@ -127,10 +127,6 @@ namespace skyscraper8.DvbNip
SetFileAssociations(fluteListener, fdtAnnouncement);
}
}
else
{
Console.WriteLine("aaa");
}
fluteStream.Close();
fluteStream.Dispose();
flutes.Remove(fluteCoordinate);

View File

@ -5,6 +5,7 @@ using skyscraper8.Ietf.FLUTE;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -57,6 +58,9 @@ namespace skyscraper8.DvbNip
public static bool IsMime(Stream s)
{
if (s is GZipStream)
return false;
if (s.GetAvailableBytes() <= MimeVersionMagic.Length)
{
return false;

View File

@ -329,7 +329,10 @@ namespace skyscraper5.src.InteractionChannel.Model
handler.OnReturnTransmissionMOdes(macAddress, (_0xb2_ReturnTransmissionModesDescriptor)descriptor);
break;
case 0xb7:
handler.OnFramePayloadFormatAnnouncement(networkId.Value, (_0xb7_FramePayloadFormatDescriptor)descriptor);
if (networkId.HasValue)
{
handler.OnFramePayloadFormatAnnouncement(networkId.Value, (_0xb7_FramePayloadFormatDescriptor)descriptor);
}
break;
case 0xb9:
handler.LogonResponseDescriptor(macAddress, (_0xb9_LogonResponseDescriptor)descriptor);

View File

@ -2,7 +2,7 @@
"profiles": {
"skyscraper8": {
"commandName": "Project",
"commandLineArgs": "\"Z:\\Persönliches\\Satellitescommunity\\65W11304V.TS\"",
"commandLineArgs": "\"C:\\devel\\skyscraper8\\skyscraper8\\bin\\Debug\\net8.0\\testsuite\\thor_11049v_simmin-radiomidun.ts\"",
"remoteDebugEnabled": false
},
"Container (Dockerfile)": {

View File

@ -2,7 +2,9 @@
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text;
namespace skyscraper5.Skyscraper.IO
@ -156,6 +158,12 @@ namespace skyscraper5.Skyscraper.IO
[DebuggerStepThrough]
public static long GetAvailableBytes(this Stream stream)
{
if (stream is GZipStream)
{
GZipStream gzip = (GZipStream)stream;
long baseStreamPosition = gzip.BaseStream.Length - gzip.BaseStream.Position;
return baseStreamPosition;
}
return stream.Length - stream.Position;
}

View File

@ -4,7 +4,7 @@ namespace skyscraper8;
public class VersionInfo
{
private const int PUBLIC_RELEASE = 14;
private const int PUBLIC_RELEASE = 15;
public static int GetPublicReleaseNumber()
{