Overhaul the debug_selector and log_selector machinery to support variable-length...
[exim.git] / src / src / transports / smtp.c
index 0e1aa308d809dcd56795efc94b1c21547bc62af8..609dba3aedb5362b4c1ecd6da33213fbe60ff65d 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2014 */
+/* Copyright (c) University of Cambridge 1995 - 2015 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -638,7 +638,7 @@ if (addr->message)
   }
 else
   {
-  if (log_extra_selector & LX_outgoing_port)
+  if (LOGGING(outgoing_port))
     message = string_sprintf("%s:%d", message,
                host->port == PORT_NONE ? 25 : host->port);
   log_write(0, LOG_MAIN, "%s %s", message, strerror(addr->basic_errno));
@@ -1461,14 +1461,14 @@ if (continue_hostname == NULL)
           || verify_check_given_host(&ob->hosts_try_dane, host) == OK
           )
        && (rc = tlsa_lookup(host, &tlsa_dnsa, dane_required, &dane)) != OK
-       && dane_required
+       && dane_required        /* do not error on only dane-requested */
        )
        {
        set_errno(addrlist, ERRNO_DNSDEFER,
          string_sprintf("DANE error: tlsa lookup %s",
            rc == DEFER ? "DEFER" : "FAIL"),
          rc, FALSE, NULL);
-       return  rc;
+       return rc;
        }
       }
     else if (dane_required)
@@ -2380,7 +2380,7 @@ if (!ok) ok = TRUE; else
 
     if (
 #ifndef EXPERIMENTAL_EVENT
-          (log_extra_selector & LX_smtp_confirmation) != 0 &&
+          LOGGING(smtp_confirmation) &&
 #endif
           !lmtp
        )
@@ -2435,7 +2435,7 @@ if (!ok) ok = TRUE; else
           continue;
           }
         completed_address = TRUE;   /* NOW we can set this flag */
-        if ((log_extra_selector & LX_smtp_confirmation) != 0)
+        if (LOGGING(smtp_confirmation))
           {
           const uschar *s = string_printing(buffer);
          /* deconst cast ok here as string_printing was checked to have alloc'n'copied */