From: David Woodhouse Date: Thu, 31 May 2012 22:13:59 +0000 (+0100) Subject: Fix GnuTLS select() during handshake X-Git-Tag: v3.99~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e25481d35e1623605cebb2f04f0b2b245706ec1b;p=platform%2Fupstream%2Fopenconnect.git Fix GnuTLS select() during handshake It was using vpninfo->ssl_fd even though that's not set yet. Signed-off-by: David Woodhouse --- 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);