MeterFile VerifyMeterFile return changed to false if file cannot be read

This commit is contained in:
Thomas Wiedebusch
2022-04-21 17:37:50 +02:00
parent ad752435c1
commit 00cf24a93e
15 changed files with 7 additions and 15 deletions
+1 -1
View File
@@ -155,7 +155,7 @@
</site>
<site name="MeterProcessState" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:56011:localhost" />
@@ -554,11 +554,14 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// <remarks date="2022-Apr-06" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
/// <remarks date="2022-Apr-21" author="Thomas Wiedebusch">
/// - Changed return value to false, if file could not be read.
/// </remarks>
public Boolean VerifyMeterFile(String fileName, Byte[] dataBytes)
{
var returnValue = true;
if (!ReadMeterFile(fileName, out var binData, dataBytes.Length)) return true;
if (!ReadMeterFile(fileName, out var binData, dataBytes.Length)) return false;
// compare the entire buffer which also includes the header of the file, remind the original
// buffer may be smaller due to the chunk size of the communication (always dividable by 4),
@@ -1 +1 @@
46bd00889699f5a20a4981a22f62b66368323855
7ac73abb7afd9e6ddc0520a1568581c7ed0afd36
@@ -1 +1 @@
0d85a5b3a7561b41163c20e5dc7713bcd0d65555
f64d563def603c89cafafa61a3219ba97e1e344c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long