diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-12-01 11:55:52 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-12-01 11:55:52 +0000 |
commit | b36346bda4b00b9d510a4283affa56b281f1417b (patch) | |
tree | cc146c757c08ed7f6a2dc7883629b22483b8ae3e | |
parent | eccbf09d0a53de28987e1b401d159d66b18f14d2 (diff) | |
download | gnutls-b36346bda4b00b9d510a4283affa56b281f1417b.tar.gz |
Don't infloop.
-rw-r--r-- | src/cli.c | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -632,24 +632,17 @@ after_handshake: for (;;) { - if (starttls_alarmed) + if (starttls_alarmed && !hd.secure) { - if (hd.secure == 0) - { - fprintf (stderr, "*** Starting TLS handshake\n"); - ret = do_handshake (&hd); - if (ret < 0) - { - fprintf (stderr, "*** Handshake has failed\n"); - socket_bye (&hd); - user_term = 1; - } - } - else + fprintf (stderr, "*** Starting TLS handshake\n"); + ret = do_handshake (&hd); + if (ret < 0) { + fprintf (stderr, "*** Handshake has failed\n"); + socket_bye (&hd); user_term = 1; + break; } - continue; } FD_ZERO (&rset); |