From ffd15d6239cc7a4de197f90208f040fa38327602 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 7 May 2019 01:22:00 +0100 Subject: [PATCH] Fix reacting to no sense when dumping SSC. --- DiscImageChef.Core/Devices/Dumping/SSC.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DiscImageChef.Core/Devices/Dumping/SSC.cs b/DiscImageChef.Core/Devices/Dumping/SSC.cs index 35470d49c..105430b4d 100644 --- a/DiscImageChef.Core/Devices/Dumping/SSC.cs +++ b/DiscImageChef.Core/Devices/Dumping/SSC.cs @@ -100,14 +100,14 @@ namespace DiscImageChef.Core.Devices.Dumping fxSense = Sense.DecodeFixed(senseBuf, out strSense); } while(fxSense.HasValue && fxSense.Value.ASC == 0x00 && - (fxSense.Value.ASCQ == 0x1A || fxSense.Value.ASCQ != 0x04)); + (fxSense.Value.ASCQ == 0x1A || fxSense.Value.ASCQ != 0x04 || fxSense.Value.ASCQ != 0x00)); dev.RequestSense(out senseBuf, dev.Timeout, out duration); fxSense = Sense.DecodeFixed(senseBuf, out strSense); // And yet, did not rewind! if(fxSense.HasValue && - (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x04 || fxSense.Value.ASC != 0x00)) + (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x04 && fxSense.Value.ASCQ != 0x00 || fxSense.Value.ASC != 0x00)) { StoppingErrorMessage?.Invoke("Drive could not rewind, please correct. Sense follows..." + Environment.NewLine + strSense); @@ -173,7 +173,7 @@ namespace DiscImageChef.Core.Devices.Dumping (fxSense.Value.ASCQ == 0x1A || fxSense.Value.ASCQ == 0x19)); // And yet, did not rewind! - if(fxSense.HasValue && (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x04 || + if(fxSense.HasValue && (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x04 && fxSense.Value.ASCQ != 0x00 || fxSense.Value.ASC != 0x00)) { StoppingErrorMessage?.Invoke("Drive could not rewind, please correct. Sense follows..." + @@ -601,7 +601,7 @@ namespace DiscImageChef.Core.Devices.Dumping // And yet, did not rewind! if(fxSense.HasValue && - (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x04 || fxSense.Value.ASC != 0x00)) + (fxSense.Value.ASC == 0x00 && fxSense.Value.ASCQ != 0x00 && fxSense.Value.ASCQ != 0x04 || fxSense.Value.ASC != 0x00)) { StoppingErrorMessage?.Invoke("Drive could not rewind, please correct. Sense follows..." + Environment.NewLine + strSense);