From a2dc6e63cf5c1ac7abb048d4af8e581d5d16af51 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Fri, 28 Jan 2022 13:46:25 +0200 Subject: [PATCH] Fix sdcard logging when crypto is used but algorithm is set to NONE If the board supports encrypting logfiles, but the parameter SDCARD_ALGORITHM is set to NONE, the log should be written to the sdcard in plaintext format. This fixes a bug which caused logger to hang in mutex instead. Signed-off-by: Jukka Laitinen --- src/modules/logger/log_writer_file.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/logger/log_writer_file.cpp b/src/modules/logger/log_writer_file.cpp index a0ee9c6ea8..b32d5ff0ae 100644 --- a/src/modules/logger/log_writer_file.cpp +++ b/src/modules/logger/log_writer_file.cpp @@ -86,6 +86,7 @@ LogWriterFile::~LogWriterFile() bool LogWriterFile::init_logfile_encryption(const char *filename) { if (_algorithm == CRYPTO_NONE) { + _min_blocksize = 1; return true; }