Add retry type "lookup". Bug 1566
[exim.git] / src / src / log.c
index 3a91ed295d3f6b0315bca29231606604cc5e0f74..e8b514bfdf50b33a994befca576f7c73e4bddece 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2012 */
+/* Copyright (c) University of Cambridge 1995 - 2014 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Functions for writing log files. The code for maintaining datestamped
@@ -179,7 +179,7 @@ overwrite it temporarily if it is necessary to create the directory.
 Returns:       a file descriptor, or < 0 on failure (errno set)
 */
 
-static int
+int
 log_create(uschar *name)
 {
 int fd = Uopen(name, O_CREAT|O_APPEND|O_WRONLY, LOG_MODE);
@@ -672,9 +672,9 @@ if (!path_inspected)
     {
     int sep = ':';              /* Fixed separator - outside use */
     uschar *s;
-    uschar *ss = log_file_path;
+    const uschar *ss = log_file_path;
     logging_mode = 0;
-    while ((s = string_nextinlist(&ss,&sep,log_buffer,LOG_BUFFER_SIZE)) != NULL)
+    while ((s = string_nextinlist(&ss, &sep, log_buffer, LOG_BUFFER_SIZE)))
       {
       if (Ustrcmp(s, "syslog") == 0)
         logging_mode |= LOG_MODE_SYSLOG;
@@ -698,9 +698,8 @@ if (!path_inspected)
         else
           {
           uschar *t;
-          uschar *tt = US LOG_FILE_PATH;
-          while ((t = string_nextinlist(&tt,&sep,log_buffer,LOG_BUFFER_SIZE))
-                != NULL)
+          const uschar *tt = US LOG_FILE_PATH;
+          while ((t = string_nextinlist(&tt, &sep, log_buffer, LOG_BUFFER_SIZE)))
             {
             if (Ustrcmp(t, "syslog") == 0 || t[0] == 0) continue;
             file_path = string_copy(t);
@@ -1093,7 +1092,10 @@ if ((flags & LOG_PANIC) != 0)
     panic_recurseflag = FALSE;
 
     if (panic_save_buffer != NULL)
-      (void) write(paniclogfd, panic_save_buffer, Ustrlen(panic_save_buffer));
+      {
+      int i = write(paniclogfd, panic_save_buffer, Ustrlen(panic_save_buffer));
+      i = i;   /* compiler quietening */
+      }
 
     written_len = write_to_fd_buf(paniclogfd, log_buffer, length);
     if (written_len != length)