summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-05-06 08:46:05 +0300
committerdefanor <defanor@uberspace.net>2017-05-06 08:46:05 +0300
commitf69bbf7f99791226746de0d201518104257976c2 (patch)
treeb2963661e8d2fc105763e8a13b66a2a4d55b7bdc
parent1f683c7da231011df12f2271f4e5509efd3e6376 (diff)
downloadtlsd-f69bbf7f99791226746de0d201518104257976c2.zip
tlsd-f69bbf7f99791226746de0d201518104257976c2.tar.gz
tlsd-f69bbf7f99791226746de0d201518104257976c2.tar.bz2
Verify that the listener socket is closedHEADmaster
It doesn't really affect functionality, but better to get an error message if something would go wrong.
-rw-r--r--configure.ac2
-rw-r--r--tlsd.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0a07b8f..16f311e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT(TLSd, 0.0.7, defanor@uberspace.net, tlsd,
+AC_INIT(TLSd, 0.0.8, defanor@uberspace.net, tlsd,
https://defanor.uberspace.net/projects/tlsd/)
AM_INIT_AUTOMAKE([-Wall])
AC_CONFIG_SRCDIR([tlsd.c])
diff --git a/tlsd.c b/tlsd.c
index db14bbf..3447021 100644
--- a/tlsd.c
+++ b/tlsd.c
@@ -730,7 +730,8 @@ int serve (options opt)
if (cc.tcp_socket >= 0)
conn_terminate(&cc, 1, opt.child_kill_signo);
}
- close(listener);
+ if (close(listener))
+ err_msg(LOG_ERR, "Failed to close the listener socket");
gnutls_certificate_free_credentials(x509_cred);
gnutls_dh_params_deinit(dh_params);
gnutls_global_deinit();