tidying
[users/heiko/exim.git] / src / src / transport.c
index 6b33a0e6872fed441e27b976b86ce4d0a1c02d65..a04663277acc971bbe6dd6813e4bc09e909e9ebd 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* General functions concerned with transportation, and generic options for all
@@ -1250,7 +1251,7 @@ via a(nother) pipe. While writing to the filter, we do not do the CRLF,
 smtp dots, or check string processing. */
 
 if (pipe(pfd) != 0) goto TIDY_UP;      /* errno set */
-if ((write_pid = exim_fork(US"transport filter writer")) == 0)
+if ((write_pid = exim_fork(US"tpt-filter-writer")) == 0)
   {
   BOOL rc;
   (void)close(fd_read);
@@ -1274,7 +1275,7 @@ if ((write_pid = exim_fork(US"transport filter writer")) == 0)
         != sizeof(struct timeval)
      )
     rc = FALSE;        /* compiler quietening */
-  exim_underbar_exit(0, US"tpt-filter writer");
+  exim_underbar_exit(EXIT_SUCCESS);
   }
 save_errno = errno;
 
@@ -1399,7 +1400,6 @@ if (write_pid > 0)
        int dummy = read(pfd[pipe_read], (void *)&save_errno, sizeof(int));
         dummy = read(pfd[pipe_read], (void *)&tctx->addr->more_errno, sizeof(int));
         dummy = read(pfd[pipe_read], (void *)&tctx->addr->delivery_time, sizeof(struct timeval));
-       dummy = dummy;          /* compiler quietening */
         yield = FALSE;
         }
       }
@@ -1570,7 +1570,7 @@ for (host_item * host = hostlist; host; host = host->next)
     {
     sprintf(CS buffer, "%.200s:%d", host->name, host_record->sequence);
     dbfn_write(dbm_file, buffer, host_record, sizeof(dbdata_wait) + host_length);
-#ifdef EXPERIMENTAL_QUEUE_RAMP
+#ifndef DISABLE_QUEUE_RAMP
     if (f.queue_2stage && queue_fast_ramp && !queue_run_in_order)
       queue_notify_daemon(message_id);
 #endif
@@ -1627,7 +1627,6 @@ Arguments:
   local_message_max  maximum number of messages down one connection
                        as set by the caller transport
   new_message_id     set to the message id of a waiting message
-  more               set TRUE if there are yet more messages waiting
   oicf_func          function to call to validate if it is ok to send
                      to this message_id from the current instance.
   oicf_data          opaque data for oicf_func
@@ -1643,7 +1642,7 @@ typedef struct msgq_s
 
 BOOL
 transport_check_waiting(const uschar *transport_name, const uschar *hostname,
-  int local_message_max, uschar *new_message_id, BOOL *more, oicf oicf_func, void *oicf_data)
+  int local_message_max, uschar *new_message_id, oicf oicf_func, void *oicf_data)
 {
 dbdata_wait *host_record;
 int host_length;
@@ -1653,8 +1652,6 @@ open_db *dbm_file;
 int         i;
 struct stat statbuf;
 
-*more = FALSE;
-
 DEBUG(D_transport)
   {
   debug_printf("transport_check_waiting entered\n");
@@ -1858,9 +1855,7 @@ record if required, close the database, and return TRUE. */
 if (host_length > 0)
   {
   host_record->count = host_length/MESSAGE_ID_LENGTH;
-
   dbfn_write(dbm_file, hostname, host_record, (int)sizeof(dbdata_wait) + host_length);
-  *more = TRUE;
   }
 
 dbfn_close(dbm_file);
@@ -1958,7 +1953,7 @@ int status;
 
 DEBUG(D_transport) debug_printf("transport_pass_socket entered\n");
 
-if ((pid = exim_fork(US"continued-transport interproc")) == 0)
+if ((pid = exim_fork(US"continued-transport-interproc")) == 0)
   {
   /* Disconnect entirely from the parent process. If we are running in the
   test harness, wait for a bit to allow the previous process time to finish,
@@ -1966,11 +1961,8 @@ if ((pid = exim_fork(US"continued-transport interproc")) == 0)
   automatic comparison. */
 
   if ((pid = exim_fork(US"continued-transport")) != 0)
-    {
-    DEBUG(D_transport) debug_printf("transport_pass_socket succeeded (final-pid %d)\n", pid);
     _exit(EXIT_SUCCESS);
-    }
-  testharness_pause_ms(1000); /*TTT*/
+  testharness_pause_ms(1000);
 
   transport_do_pass_socket(transport_name, hostname, hostaddress,
     id, socket_fd);
@@ -1984,7 +1976,6 @@ if (pid > 0)
   {
   int rc;
   while ((rc = wait(&status)) != pid && (rc >= 0 || errno != ECHILD));
-  DEBUG(D_transport) debug_printf("transport_pass_socket succeeded (inter-pid %d)\n", pid);
   return TRUE;
   }
 else