summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-06-15 11:09:16 +0200
committerSimon Josefsson <simon@josefsson.org>2010-06-15 11:09:16 +0200
commit4363960c22ab2957a0ad1da9ceb9c188473b31d5 (patch)
tree5ce581679ea9b19c17b02baf8e1685c773768646
parentb2fca85c8fe5db6baa630e9a6451428b50bb39b0 (diff)
downloadgnutls-4363960c22ab2957a0ad1da9ceb9c188473b31d5.tar.gz
gnutls-cli: Make --starttls work again.
Problem introduced in patch to use read() instead of fgets() committed on 2010-01-27.
-rw-r--r--src/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cli.c b/src/cli.c
index 0e53bdcb53..6b08beab75 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -837,7 +837,7 @@ after_handshake:
if (FD_ISSET (fileno (stdin), &rset))
{
- if ((bytes = read (fileno (stdin), buffer, MAX_BUF - 1)) < 0)
+ if ((bytes = read (fileno (stdin), buffer, MAX_BUF - 1)) <= 0)
{
if (hd.secure == 0)
{