summaryrefslogtreecommitdiff
path: root/Utilities/cmcurl/lib/pingpong.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/lib/pingpong.c')
-rw-r--r--Utilities/cmcurl/lib/pingpong.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Utilities/cmcurl/lib/pingpong.c b/Utilities/cmcurl/lib/pingpong.c
index e08c1d8663..d4e6be98c4 100644
--- a/Utilities/cmcurl/lib/pingpong.c
+++ b/Utilities/cmcurl/lib/pingpong.c
@@ -18,6 +18,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * SPDX-License-Identifier: curl
+ *
* 'pingpong' is for generic back-and-forth support functions used by FTP,
* IMAP, POP3, SMTP and whatever more that likes them.
*
@@ -328,7 +330,7 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data,
else if(gotbytes <= 0) {
keepon = FALSE;
result = CURLE_RECV_ERROR;
- failf(data, "response reading failed");
+ failf(data, "response reading failed (errno: %d)", SOCKERRNO);
}
else {
/* we got a whole chunk of data, which can be anything from one
@@ -396,7 +398,8 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data,
}
else if(keepon) {
- if((perline == gotbytes) && (gotbytes > data->set.buffer_size/2)) {
+ if((perline == gotbytes) &&
+ (gotbytes > (ssize_t)data->set.buffer_size/2)) {
/* We got an excessive line without newlines and we need to deal
with it. We keep the first bytes of the line then we throw
away the rest. */