summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-11-06 11:27:54 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-11-06 11:27:54 +0000
commit520de300979cb6cf448cd23f729dd39368202a16 (patch)
tree74eda4f2e0005ec6cae3628a79dd44de686adf8c /src
parenteddd06b00afcd7fd08356839f4515ed7ac339165 (diff)
No paniclog for ECONNRESET when getsockname() fails.
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 1311d711c..797a51c20 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/daemon.c,v 1.16 2006/09/05 14:14:32 ph10 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.17 2006/11/06 11:27:54 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -186,13 +186,14 @@ if (smtp_in == NULL)
goto ERROR_RETURN;
}
-/* Get the data for the local interface address. */
+/* Get the data for the local interface address. Panic for most errors, but
+"connection reset by peer" just means the connection went away. */
if (getsockname(accept_socket, (struct sockaddr *)(&interface_sockaddr),
&ifsize) < 0)
{
- log_write(0, LOG_MAIN|LOG_PANIC, "getsockname() failed: %s",
- strerror(errno));
+ log_write(0, LOG_MAIN | ((errno == ECONNRESET)? 0 : LOG_PANIC),
+ "getsockname() failed: %s", strerror(errno));
smtp_printf("421 Local problem: getsockname() failed; please try again later\r\n");
goto ERROR_RETURN;
}