diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-07-18 14:18:31 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-07-18 14:18:31 +0000 |
commit | ffd45a9640f7588920de272c1a882f8db2cde7eb (patch) | |
tree | 82ffa4bd6648e6f7c3ee64864a703514ea043d4f /package/uhttpd/src/uhttpd.c | |
parent | cdaf0b7073b20ef0b86c53511337d68fe99a248f (diff) | |
download | master-187ad058-ffd45a9640f7588920de272c1a882f8db2cde7eb.tar.gz master-187ad058-ffd45a9640f7588920de272c1a882f8db2cde7eb.tar.bz2 master-187ad058-ffd45a9640f7588920de272c1a882f8db2cde7eb.zip |
[package] uhttpd: support building against openssl instead of cyassl, minor cleanups (#7827)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27686 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uhttpd/src/uhttpd.c')
-rw-r--r-- | package/uhttpd/src/uhttpd.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c index 4a3bced722..3563d91d16 100644 --- a/package/uhttpd/src/uhttpd.c +++ b/package/uhttpd/src/uhttpd.c @@ -512,7 +512,22 @@ static void uh_mainloop(struct config *conf, fd_set serv_fds, int max_fd) #ifdef HAVE_TLS /* setup client tls context */ if( conf->tls ) - conf->tls_accept(cl); + { + if( conf->tls_accept(cl) < 1 ) + { + fprintf(stderr, + "tls_accept failed, " + "connection dropped\n"); + + /* close client socket */ + close(new_fd); + + /* remove from global client list */ + uh_client_remove(new_fd); + + continue; + } + } #endif /* add client socket to global fdset */ |