]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/log.c
Fix macro_predef build for auth_cyrus_sasl
[user/henk/code/exim.git] / src / src / log.c
index 081e47bf9043f0a8dad3227f9a61a02cc13528ad..62ee629b00320c23e8abec7ea3cbeff825033c2a 100644 (file)
@@ -391,7 +391,7 @@ 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)
+if (type == lt_main && string_datestamp_offset >= 0)
   {
   Ustrcpy(mainlog_name, buffer);
   mainlog_datestamp = mainlog_name + string_datestamp_offset;
@@ -399,7 +399,7 @@ if (type == lt_main)
 
 /* Ditto for the reject log */
 
-else if (type == lt_reject)
+else if (type == lt_reject && string_datestamp_offset >= 0)
   {
   Ustrcpy(rejectlog_name, buffer);
   rejectlog_datestamp = rejectlog_name + string_datestamp_offset;
@@ -704,7 +704,7 @@ If it is not, don't try to write to the log because permission will probably be
 denied.
 
 Avoid actually writing to the logs when exim is called with -bv or -bt to
-test an address, but take other actions, such as panicing.
+test an address, but take other actions, such as panicking.
 
 In Exim proper, the buffer for building the message is got at start-up, so that
 nothing gets done if it can't be got. However, some functions that are also
@@ -909,9 +909,9 @@ while(*ptr) ptr++;
 if (LOGGING(pid))
   {
   sprintf(CS ptr, "[%d] ", (int)getpid());
-  if (!syslog_pid) pid_position[0] = ptr - log_buffer; // remember begin …
+  if (!syslog_pid) pid_position[0] = ptr - log_buffer; /* remember begin … */
   while (*ptr) ptr++;
-  if (!syslog_pid) pid_position[1] = ptr - log_buffer; // … and end+1 of the PID
+  if (!syslog_pid) pid_position[1] = ptr - log_buffer; /*  … and end+1 of the PID */
   }
 
 if (really_exim && message_id[0] != 0)
@@ -1000,7 +1000,7 @@ if (  flags & LOG_MAIN
     operation. This happens at midnight, at which point we want to roll over
     the file. Closing it has the desired effect. */
 
-    if (mainlog_datestamp != NULL)
+    if (mainlog_datestamp)
       {
       uschar *nowstamp = tod_stamp(string_datestamp_type);
       if (Ustrncmp (mainlog_datestamp, nowstamp, Ustrlen(nowstamp)) != 0)