diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-12-31 17:40:23 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-12-31 17:40:23 +0100 |
commit | b6d9114baa1f8323084001fd4bc44fb08f7f1b35 (patch) | |
tree | a1da9ac31d61dac1c337bedcff29805061c9ff54 /listen.c | |
parent | 57fc4cd7ff5918af11eb4b5f6ad765c89432b210 (diff) |
exit if no sockets could be bound
Diffstat (limited to 'listen.c')
-rw-r--r-- | listen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -98,7 +98,7 @@ int uh_socket_bind(const char *host, const char *port, bool tls) if ((status = getaddrinfo(host, port, &hints, &addrs)) != 0) { fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(status)); - return -1; + return 0; } /* try to bind a new socket to each found address */ @@ -163,6 +163,7 @@ int uh_socket_bind(const char *host, const char *port, bool tls) l->fd.fd = sock; l->tls = tls; list_add_tail(&l->list, &listeners); + bound++; continue; |