From 9d612f972671adcc1b5679f9562559e0c6d898a0 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 22 Apr 2017 18:32:36 +1000 Subject: [PATCH] Fix MSGID --- mail_menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index a3bcf6f..3f04791 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -89,12 +89,12 @@ unsigned long generate_msgid() { flock(fileno(fptr), LOCK_UN); fclose(fptr); } else { + lastid = unixtime; dolog("Unable to open message id log"); - return 0; } } - - return lastid; + sprintf(buffer, "%X", lastid); + return strtoul(&buffer[strlen(buffer) - 8], NULL, 16); } void free_message_headers(struct msg_headers *msghs) {