From 083aeb200dd1acef00728d37f27d0832767c0374 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 10 Sep 2021 17:51:03 +0200 Subject: [PATCH] wip --- slsDetectorServers/slsDetectorServer/src/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/slsDetectorServers/slsDetectorServer/src/common.c b/slsDetectorServers/slsDetectorServer/src/common.c index 49449118d..031f5d474 100644 --- a/slsDetectorServers/slsDetectorServer/src/common.c +++ b/slsDetectorServers/slsDetectorServer/src/common.c @@ -321,6 +321,15 @@ int verifyChecksumFromFlash(char *mess, char *clientChecksum, char *fname, } bytes = fread(buf + 1, 1, readUnitSize, fp); totalBytesRead += bytes; + if (totalBytesRead <= 2 * bytes) { + for (int i = 0; i < 3; ++i) { + printf("%d:[0x%02x]\n", i, (uint8_t)buf[i]); + } + for (int i = 126; i < 129; ++i) { + printf("%d:[0x%02x]\n", i, (uint8_t)buf[i]); + } + printf("\n"); + } } // last null character (if size does not match) /*if (fsize == totalBytesRead + 1) {