[exim-cvs] Set mainlog_name and rejectlog_name unconditional…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Exim Git Commits Mailing List
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] Set mainlog_name and rejectlog_name unconditionally.
Gitweb: https://git.exim.org/exim.git/commitdiff/3f06b9b4c7244b169d50bce216c1f54b4dfe7efb
Commit:     3f06b9b4c7244b169d50bce216c1f54b4dfe7efb
Parent:     cf39dad3d551222a3e1f681995c287eb53e2596f
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Mon Apr 12 08:41:44 2021 +0200
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Mon Apr 12 09:07:14 2021 +0200


    Set mainlog_name and rejectlog_name unconditionally.
---
 src/src/log.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)


diff --git a/src/src/log.c b/src/src/log.c
index 88cc12c..2cf5780 100644
--- a/src/src/log.c
+++ b/src/src/log.c
@@ -403,18 +403,20 @@ it gets statted to see if it has been cycled. With a datestamp, the datestamp
will be compared. The static slot for saving it is the same size as buffer,
and the text has been checked above to fit, so this use of strcpy() is OK. */

-if (type == lt_main && string_datestamp_offset >= 0)
+if (type == lt_main)
   {
   Ustrcpy(mainlog_name, buffer);
-  mainlog_datestamp = mainlog_name + string_datestamp_offset;
+  if (string_datestamp_offset > 0)
+    mainlog_datestamp = mainlog_name + string_datestamp_offset;
   }


/* Ditto for the reject log */

-else if (type == lt_reject && string_datestamp_offset >= 0)
+else if (type == lt_reject)
   {
   Ustrcpy(rejectlog_name, buffer);
-  rejectlog_datestamp = rejectlog_name + string_datestamp_offset;
+  if (string_datestamp_offset > 0)
+    rejectlog_datestamp = rejectlog_name + string_datestamp_offset;
   }


/* and deal with the debug log (which keeps the datestamp, but does not