1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Remove bogus optimisation of telnet upload.

Remove wrongly implemented optimisation of telnet upload, apparently
intended to allow the library to avoid manually polling for input.
This commit is contained in:
Colin Hogben 2012-01-04 11:24:49 +00:00 committed by Daniel Stenberg
parent 4563eeb9f4
commit 51c485342b

View File

@ -767,11 +767,16 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
/* for uploads */ /* for uploads */
input.fd = infd; input.fd = infd;
input.config = config; input.config = config;
/* Note that if CURLOPT_READFUNCTION is fread (the default), then
* lib/telnet.c will Curl_poll() on the input file descriptor
* rather then calling the READFUNCTION at regular intervals.
* The circumstances in which it is preferable to enable this
* behaviour, by omitting to set the READFUNCTION & READDATA options,
* have not been determined.
*/
my_setopt(curl, CURLOPT_READDATA, &input); my_setopt(curl, CURLOPT_READDATA, &input);
/* what call to read */ /* what call to read */
if((outfile && !curlx_strequal("-", outfile)) || my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb);
!checkprefix("telnet:", this_url))
my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb);
/* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what
CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */ CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */