diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-01 11:23:20 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-01 11:23:20 +0000 |
commit | a9ef75c50d35afc115d443ddc7dd35956fc5a2ef (patch) | |
tree | fe6cfea4197d8798af0a67354e1e58f66f7ad064 /apps/s_client.c | |
parent | 7edd20916a35735f809bccd6d595c209814b1c2e (diff) |
Small fix to enable reading from stdin as well.
Contributed by Yoichiro Okabe <okabe@wizsoft.co.jp>
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index e629f8e7f1..277417efd8 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -523,7 +523,7 @@ re_start: tv.tv_usec = 0; i=select(width,(void *)&readfds,(void *)&writefds, NULL,&tv); - if(!i && (!_kbhit() || !read_tty) ) continue; + if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue; } else i=select(width,(void *)&readfds,(void *)&writefds, NULL,NULL); } @@ -689,7 +689,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240 } #ifdef WINDOWS - else if (_kbhit()) + else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) #else else if (FD_ISSET(fileno(stdin),&readfds)) #endif |