According to [1]: "Returning 0 will signal end-of-file to the library
and cause it to stop the current transfer."
This change makes the Windows telnet code handle this case accordingly.
[1] http://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
if(result == CURL_READFUNC_PAUSE)
break;
- if(result == 0) /* no bytes */
+ if(result == 0) { /* no bytes, means end-of-file */
+ keepon = FALSE;
break;
+ }
readfile_read = result; /* fall thru with number of bytes read */
}