aboutsummaryrefslogtreecommitdiff
path: root/lib/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/telnet.c')
-rw-r--r--lib/telnet.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/telnet.c b/lib/telnet.c
index 201bd6b50..cda76d446 100644
--- a/lib/telnet.c
+++ b/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);
}