diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-11-29 12:48:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-11-29 12:48:08 +0000 |
commit | 6a9697387afe3656fe308a4cc009696ea99b1b1e (patch) | |
tree | 712d49ecddad8b997f131c5e2c4caea207ce1e35 | |
parent | 85c8981b3d31a935583b45fca5a196dbd8e7cfbc (diff) |
stdin is file descriptor 0
-rw-r--r-- | lib/telnet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/telnet.c b/lib/telnet.c index c69ce31f5..583c9c0f1 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -1142,7 +1142,7 @@ CURLcode Curl_telnet(struct connectdata *conn) #else FD_ZERO (&readfd); /* clear it */ FD_SET (sockfd, &readfd); - FD_SET (1, &readfd); + FD_SET (0, &readfd); keepfd = readfd; @@ -1156,13 +1156,13 @@ CURLcode Curl_telnet(struct connectdata *conn) case 0: /* timeout */ break; default: /* read! */ - if(FD_ISSET(1, &readfd)) { /* read from stdin */ + if(FD_ISSET(0, &readfd)) { /* read from stdin */ unsigned char outbuf[2]; int out_count = 0; size_t bytes_written; char *buffer = buf; - nread = read(1, buf, 255); + nread = read(0, buf, 255); while(nread--) { outbuf[0] = *buffer++; |