summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/lib/smb.c')
-rw-r--r--Utilities/cmcurl/lib/smb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Utilities/cmcurl/lib/smb.c b/Utilities/cmcurl/lib/smb.c
index afcc99d..32c5137 100644
--- a/Utilities/cmcurl/lib/smb.c
+++ b/Utilities/cmcurl/lib/smb.c
@@ -1049,7 +1049,12 @@ static CURLcode smb_request_state(struct Curl_easy *data, bool *done)
}
data->req.bytecount += len;
data->req.offset += len;
- Curl_pgrsSetDownloadCounter(data, data->req.bytecount);
+ result = Curl_pgrsSetDownloadCounter(data, data->req.bytecount);
+ if(result) {
+ req->result = result;
+ next_state = SMB_CLOSE;
+ break;
+ }
next_state = (len < MAX_PAYLOAD_SIZE) ? SMB_CLOSE : SMB_DOWNLOAD;
break;