mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:13:37 +03:00
fixed up the telnet to work (using support from Linus Nielsen)
This commit is contained in:
parent
c41c5a0ef2
commit
a14aaaf23f
2 changed files with 17 additions and 9 deletions
20
lib/telnet.c
20
lib/telnet.c
|
|
@ -872,20 +872,22 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
|||
}
|
||||
}
|
||||
|
||||
if(FD_ISSET(sockfd, &readfd))
|
||||
if(FD_ISSET(sockfd, &readfd)) {
|
||||
Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
|
||||
|
||||
/* if we receive 0 or less here, the server closed the connection and
|
||||
we bail out from this! */
|
||||
if (nread <= 0) {
|
||||
keepon = FALSE;
|
||||
break;
|
||||
}
|
||||
/* if we receive 0 or less here, the server closed the connection and
|
||||
we bail out from this! */
|
||||
if (nread <= 0) {
|
||||
keepon = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
telrcv(data, (unsigned char *)buf, nread);
|
||||
telrcv(data, (unsigned char *)buf, nread);
|
||||
}
|
||||
}
|
||||
}
|
||||
return CURLE_OK;
|
||||
/* mark this as "no further transfer wanted" */
|
||||
return Curl_Transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue