summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2019-01-21 18:39:19 +0300
committerIgor Sysoev <igor@sysoev.ru>2019-01-21 18:39:19 +0300
commitfd6a6a5514c420dae2b393f62fee65f87758dec9 (patch)
tree590ca74444647730d17b5a1506e49a4a4d7895d2 /src
parent2677bd5604345d3fe40e821699d1a26a7d1c31a7 (diff)
downloadunit-fd6a6a5514c420dae2b393f62fee65f87758dec9.tar.gz
unit-fd6a6a5514c420dae2b393f62fee65f87758dec9.tar.bz2
Fixed processing Unix listening socket failures.
This is related to issue #198 on GitHub.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_main_process.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index 819ed44c..a4c3f119 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -1116,24 +1116,23 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
break;
}
- goto next;
- }
-
+ } else
#endif
+ {
+ switch (err) {
- switch (err) {
-
- case EACCES:
- ls->error = NXT_SOCKET_ERROR_PORT;
- break;
+ case EACCES:
+ ls->error = NXT_SOCKET_ERROR_PORT;
+ break;
- case EADDRINUSE:
- ls->error = NXT_SOCKET_ERROR_INUSE;
- break;
+ case EADDRINUSE:
+ ls->error = NXT_SOCKET_ERROR_INUSE;
+ break;
- case EADDRNOTAVAIL:
- ls->error = NXT_SOCKET_ERROR_NOADDR;
- break;
+ case EADDRNOTAVAIL:
+ ls->error = NXT_SOCKET_ERROR_NOADDR;
+ break;
+ }
}
ls->end = nxt_sprintf(ls->start, ls->end, "bind(\\\"%*s\\\") failed %E",
@@ -1143,8 +1142,6 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
#if (NXT_HAVE_UNIX_DOMAIN)
-next:
-
if (sa->u.sockaddr.sa_family == AF_UNIX) {
char *filename;
mode_t access;