From 8f78b632bf246c6f420735229bad0340f99bb25e Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 17 Jul 2023 18:08:13 +0200 Subject: [PATCH] Minor changes --- .gitignore | 1 + src/logger.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1c3f37a..a8bf405 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ # Caches /logs /data +/cdata /pid /logger_*.log \ No newline at end of file diff --git a/src/logger.c b/src/logger.c index a94f110..852898e 100644 --- a/src/logger.c +++ b/src/logger.c @@ -120,8 +120,8 @@ int main (int argc, char *argv []) if(queues[queue_id].size+linelen>ZMQ_MSG_SIZE){ printf("To many measurements to publish. Please increase ZMQ_MSG_SIZE\n"); } else { - strcat(queues[queue_id].msg,line); - queues[queue_id].size+=strlen(line); + memcpy(queues[queue_id].msg+queues[queue_id].size,line,linelen); + queues[queue_id].size+=linelen; } // Reset power register file: fseek(regptr,0,SEEK_SET);