X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=blobdiff_plain;f=src%2Fsrc%2Fdaemon.c;h=a382a734ecc6e62ce529579fbf18543cb8718995;hp=7d55287858d067e87f9129f1d4d56a7c95855f1b;hb=3fc73bdc7aa8ac2b2b290033f602bdb947ae8049;hpb=acec9514b1006e352ef283f205ecec75a9b6ff0d diff --git a/src/src/daemon.c b/src/src/daemon.c index 7d5528785..a382a734e 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2017 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions concerned with running Exim as a daemon */ @@ -144,8 +144,7 @@ EXIM_SOCKLEN_T ifsize = sizeof(interface_sockaddr); int dup_accept_socket = -1; int max_for_this_host = 0; int save_log_selector = *log_selector; -gstring * whofrom = NULL; -uschar * whofrom_s; +gstring * whofrom; void *reset_point = store_get(0); @@ -200,7 +199,7 @@ DEBUG(D_interface) debug_printf("interface address=%s port=%d\n", the local interface data. This is for logging; at the end of this function the memory is reclaimed. */ -whofrom = string_append(whofrom, 3, "[", sender_host_address, "]"); +whofrom = string_append(NULL, 3, "[", sender_host_address, "]"); if (LOGGING(incoming_port)) whofrom = string_append(whofrom, 2, ":", string_sprintf("%d", sender_host_port)); @@ -564,18 +563,13 @@ if (pid == 0) /* Reclaim up the store used in accepting this message */ - return_path = sender_address = NULL; - authenticated_sender = NULL; - sending_ip_address = NULL; - deliver_host_address = deliver_host = - deliver_domain_orig = deliver_localpart_orig = NULL; - dnslist_domain = dnslist_matched = NULL; - callout_address = NULL; -#ifndef DISABLE_DKIM - dkim_cur_signer = NULL; -#endif - acl_var_m = NULL; - store_reset(reset_point); + { + int r = receive_messagecount; + BOOL q = queue_only_policy; + smtp_reset(reset_point); + queue_only_policy = q; + receive_messagecount = r; + } /* If queue_only is set or if there are too many incoming connections in existence, session_local_queue_only will be TRUE. If it is not, check @@ -654,7 +648,7 @@ if (pid == 0) the data structures if necessary. */ #ifdef SUPPORT_TLS - tls_close(TRUE, FALSE); + tls_close(NULL, TLS_NO_SHUTDOWN); #endif /* Reset SIGHUP and SIGCHLD in the child in both cases. */