From e25481d35e1623605cebb2f04f0b2b245706ec1b Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 31 May 2012 23:13:59 +0100 Subject: [PATCH] Fix GnuTLS select() during handshake It was using vpninfo->ssl_fd even though that's not set yet. Signed-off-by: David Woodhouse --- gnutls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnutls.c b/gnutls.c index b5686fe..e22d12a 100644 --- a/gnutls.c +++ b/gnutls.c @@ -961,7 +961,7 @@ int openconnect_open_https(struct openconnect_info *vpninfo) if (vpninfo->cancel_fd != -1) { FD_SET(vpninfo->cancel_fd, &rd_set); - if (vpninfo->cancel_fd > vpninfo->ssl_fd) + if (vpninfo->cancel_fd > ssl_sock) maxfd = vpninfo->cancel_fd; } select(maxfd + 1, &rd_set, &wr_set, NULL, NULL); -- 2.7.4