summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-06-03 13:55:04 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-06-26 11:08:20 +0100
commitaa3c7e485be428d9d436f917793c8598bfebd3a1 (patch)
tree444ebe246efb33c81067df9e08387cedee23dd33
parentbff2d6435aecaf2701ba12c4dd99c7f395953f19 (diff)
tidying
-rw-r--r--doc/doc-docbook/spec.xfpt4
-rw-r--r--src/src/expand.c26
-rw-r--r--src/src/ip.c2
-rw-r--r--src/src/rewrite.c35
-rwxr-xr-xtest/runtest3
5 files changed, 25 insertions, 45 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 34c4310d5..e11881cb9 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -23696,7 +23696,7 @@ inserted in the argument list at that point &'as a separate argument'&. This
avoids any problems with spaces or shell metacharacters, and is of use when a
&(pipe)& transport is handling groups of addresses in a batch.
-If &%force_command%& is enabled on the transport, Special handling takes place
+If &%force_command%& is enabled on the transport, special handling takes place
for an argument that consists of precisely the text &`$address_pipe`&. It
is handled similarly to &$pipe_addresses$& above. It is expanded and each
argument is inserted in the argument list at that point
@@ -30902,7 +30902,7 @@ client host, and its contents have been verified. If there has been no previous
attempt to verify the HELO/EHLO contents, it is carried out when this
condition is encountered. See the description of the &%helo_verify_hosts%& and
&%helo_try_verify_hosts%& options for details of how to request verification
-independently of this condition.
+independently of this condition, and for detail of the verification.
For SMTP input that does not come over TCP/IP (the &%-bs%& command line
option), this condition is always true.
diff --git a/src/src/expand.c b/src/src/expand.c
index 31059c432..2ddd22aa6 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -3709,17 +3709,15 @@ eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket)
{
uschar *s = *sptr;
int_eximarith_t x = eval_op_or(&s, decimal, error);
-if (*error == NULL)
- {
+
+if (!*error)
if (endket)
- {
if (*s != ')')
*error = US"expecting closing parenthesis";
else
while (isspace(*(++s)));
- }
- else if (*s != 0) *error = US"expecting operator";
- }
+ else if (*s)
+ *error = US"expecting operator";
*sptr = s;
return x;
}
@@ -3728,12 +3726,12 @@ return x;
static int_eximarith_t
eval_number(uschar **sptr, BOOL decimal, uschar **error)
{
-register int c;
+int c;
int_eximarith_t n;
uschar *s = *sptr;
+
while (isspace(*s)) s++;
-c = *s;
-if (isdigit(c))
+if (isdigit((c = *s)))
{
int count;
(void)sscanf(CS s, (decimal? SC_EXIM_DEC "%n" : SC_EXIM_ARITH "%n"), &n, &count);
@@ -3776,9 +3774,8 @@ if (*s == '+' || *s == '-' || *s == '~')
else if (op == '~') x = ~x;
}
else
- {
x = eval_number(&s, decimal, error);
- }
+
*sptr = s;
return x;
}
@@ -6803,15 +6800,10 @@ while (*s != 0)
case EOP_SHA256:
#ifdef EXIM_HAVE_SHA2
if (vp && *(void **)vp->value)
- {
if (c == EOP_SHA256)
- {
- uschar * cp = tls_cert_fprt_sha256(*(void **)vp->value);
- yield = string_cat(yield, cp);
- }
+ yield = string_cat(yield, tls_cert_fprt_sha256(*(void **)vp->value));
else
expand_string_message = US"sha2_N not supported with certificates";
- }
else
{
hctx h;
diff --git a/src/src/ip.c b/src/src/ip.c
index bf13d825c..bc53db18d 100644
--- a/src/src/ip.c
+++ b/src/src/ip.c
@@ -316,7 +316,7 @@ if (fastopen_blob && f.tcp_fastopen_ok)
}
else if (errno == EINPROGRESS)
{
- DEBUG(D_transport|D_v) debug_printf("TFO mode sendto, %s data: EINPROGRESS\n",
+ DEBUG(D_transport|D_v) debug_printf("TFO mode connectx, %s data: EINPROGRESS\n",
fastopen_blob->len > 0 ? "with" : "no");
if (!fastopen_blob->data)
{
diff --git a/src/src/rewrite.c b/src/src/rewrite.c
index 6b194ca91..221b438b8 100644
--- a/src/src/rewrite.c
+++ b/src/src/rewrite.c
@@ -721,34 +721,19 @@ rewrite_header(header_line *h,
const uschar *routed_old, const uschar *routed_new,
rewrite_rule *rewrite_rules, int existflags, BOOL replace)
{
+int flag;
switch (h->type)
{
- case htype_sender:
- return rewrite_one_header(h, rewrite_sender, routed_old, routed_new,
- rewrite_rules, existflags, replace);
-
- case htype_from:
- return rewrite_one_header(h, rewrite_from, routed_old, routed_new,
- rewrite_rules, existflags, replace);
-
- case htype_to:
- return rewrite_one_header(h, rewrite_to, routed_old, routed_new,
- rewrite_rules, existflags, replace);
-
- case htype_cc:
- return rewrite_one_header(h, rewrite_cc, routed_old, routed_new,
- rewrite_rules, existflags, replace);
-
- case htype_bcc:
- return rewrite_one_header(h, rewrite_bcc, routed_old, routed_new,
- rewrite_rules, existflags, replace);
-
- case htype_reply_to:
- return rewrite_one_header(h, rewrite_replyto, routed_old, routed_new,
- rewrite_rules, existflags, replace);
+ case htype_sender: flag = rewrite_sender; break;
+ case htype_from: flag = rewrite_from; break;
+ case htype_to: flag = rewrite_to; break;
+ case htype_cc: flag = rewrite_cc; break;
+ case htype_bcc: flag = rewrite_bcc; break;
+ case htype_reply_to: flag = rewrite_replyto; break;
+ default: return NULL;
}
-
-return NULL;
+return rewrite_one_header(h, flag, routed_old, routed_new,
+ rewrite_rules, existflags, replace);
}
diff --git a/test/runtest b/test/runtest
index 9effe3479..7ad54e29a 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1263,6 +1263,9 @@ RESET_AFTER_EXTRA_LINE_READ:
# TLS resumption is not always supported by the build
next if /in tls_resumption_hosts\?/;
+ # Platform differences in errno strings
+ s/ SMTP\(Operation timed out\)<</ SMTP(Connection timed out)<</;
+
# When Exim is checking the size of directories for maildir, it uses
# the check_dir_size() function to scan directories. Of course, the order
# of the files that are obtained using readdir() varies from system to