summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-09-13 23:49:09 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-09-14 00:33:48 +0100
commit584ddd64e2f0caa3673bb219407e084826f5d965 (patch)
treef249ee06ff165fb702bc4629564bfe1f806c70ba /src
parentd129bdf7868aef9212401b60fa748753535e0f7a (diff)
Logging: fix errno decodes
Diffstat (limited to 'src')
-rw-r--r--src/src/log.c2
-rw-r--r--src/src/transports/smtp.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/src/log.c b/src/src/log.c
index 860b8b0a2..032eb876f 100644
--- a/src/src/log.c
+++ b/src/src/log.c
@@ -117,7 +117,7 @@ static const uschar * exim_errstrings[] = {
const uschar *
exim_errstr(int err)
{
-return errno < 0 ? exim_errstrings[-err] : CUS strerror(err);
+return err < 0 ? exim_errstrings[-err] : CUS strerror(err);
}
/*************************************************
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 85582e753..e8a675750 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -631,11 +631,11 @@ Returns: nothing
static void
write_logs(address_item *addr, host_item *host)
{
-uschar * message = string_sprintf("H=%s [%s]", host->name, host->address);
+uschar * message = LOGGING(outgoing_port)
+ ? string_sprintf("H=%s [%s]:%d", host->name, host->address,
+ host->port == PORT_NONE ? 25 : host->port)
+ : string_sprintf("H=%s [%s]", host->name, host->address);
-if (LOGGING(outgoing_port))
- message = string_sprintf("%s:%d", message,
- host->port == PORT_NONE ? 25 : host->port);
if (addr->message)
{
message = string_sprintf("%s: %s", message, addr->message);