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); SetFileAssociations(fluteListener, fdtAnnouncement);
} }
} }
else
{
Console.WriteLine("aaa");
}
fluteStream.Close(); fluteStream.Close();
fluteStream.Dispose(); fluteStream.Dispose();
flutes.Remove(fluteCoordinate); flutes.Remove(fluteCoordinate);

View File

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

View File

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

View File

@ -2,7 +2,7 @@
"profiles": { "profiles": {
"skyscraper8": { "skyscraper8": {
"commandName": "Project", "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 "remoteDebugEnabled": false
}, },
"Container (Dockerfile)": { "Container (Dockerfile)": {

View File

@ -2,7 +2,9 @@
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.IO.Compression;
using System.Net.Sockets; using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text; using System.Text;
namespace skyscraper5.Skyscraper.IO namespace skyscraper5.Skyscraper.IO
@ -156,6 +158,12 @@ namespace skyscraper5.Skyscraper.IO
[DebuggerStepThrough] [DebuggerStepThrough]
public static long GetAvailableBytes(this Stream stream) 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; return stream.Length - stream.Position;
} }

View File

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