mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
- Fixed curl erroneously reporting output stream write failures with disabled buffering
This commit is contained in:
parent
0653fa107f
commit
5ce6454d33
@ -3289,6 +3289,7 @@ static void go_sleep(long ms)
|
||||
|
||||
static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
|
||||
{
|
||||
int res;
|
||||
size_t rc;
|
||||
struct OutStruct *out=(struct OutStruct *)stream;
|
||||
struct Configurable *config = out->config;
|
||||
@ -3323,8 +3324,8 @@ static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
|
||||
|
||||
if(config->nobuffer) {
|
||||
/* disable output buffering */
|
||||
rc = fflush(out->stream);
|
||||
if(rc) {
|
||||
res = fflush(out->stream);
|
||||
if(res) {
|
||||
/* return a value that isn't the same as sz * nmemb */
|
||||
rc = (0 == (sz * nmemb)) ? 1 : 0;
|
||||
return rc; /* failure */
|
||||
|
Loading…
Reference in New Issue
Block a user