From 6b3c914b5d6a4739e605b9d02acfbcf4af8e9508 Mon Sep 17 00:00:00 2001 From: Michal Fratczak Date: Mon, 15 Jun 2020 14:54:26 +0200 Subject: [PATCH] Add 10 to last msg_id read from file. --- tracker/code/main/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tracker/code/main/main.cpp b/tracker/code/main/main.cpp index bcff2b0..cafff02 100644 --- a/tracker/code/main/main.cpp +++ b/tracker/code/main/main.cpp @@ -276,6 +276,7 @@ int main1(int argc, char** argv) FILE* msgid_fh = fopen("./tracker.msgid", "r"); if(msgid_fh) { fscanf(msgid_fh, "%d", &msg_id); + msg_id += 10; // on power failure, last msg_id could be not written to disk fclose(msgid_fh); cout<<"Resume message ID "<