aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c4
-rw-r--r--lib/sendf.c6
-rw-r--r--lib/transfer.c6
-rw-r--r--lib/url.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/http.c b/lib/http.c
index da3815269..9e0275f70 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -392,7 +392,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
} /* while there's buffer left and loop is requested */
if(error)
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
if(200 != httperror) {
if(407 == httperror)
@@ -400,7 +400,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
failf(data, "Proxy requires authorization!");
else
failf(data, "Received error code %d from proxy", httperror);
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
infof (data, "Proxy replied to CONNECT request\n");
diff --git a/lib/sendf.c b/lib/sendf.c
index be030142d..721db36a8 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -234,7 +234,7 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd,
}
/* a true error */
failf(conn->data, "SSL_write() return error %d\n", err);
- return CURLE_WRITE_ERROR;
+ return CURLE_SEND_ERROR;
}
bytes_written = rc;
}
@@ -266,7 +266,7 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd,
#endif
*written = bytes_written;
- return (-1 != bytes_written)?CURLE_OK:CURLE_WRITE_ERROR;
+ return (-1 != bytes_written)?CURLE_OK:CURLE_SEND_ERROR;
}
/* client_write() sends data to the write callback(s)
@@ -349,7 +349,7 @@ int Curl_read(struct connectdata *conn,
break;
default:
failf(conn->data, "SSL read error: %d", err);
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
} while(loop);
if(loop && SSL_pending(conn->ssl.handle))
diff --git a/lib/transfer.c b/lib/transfer.c
index 671dba560..2e0116882 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -244,7 +244,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) {
failf (data, "Failed to alloc memory for big header!");
- return CURLE_READ_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
data->state.headersize=newsize;
data->state.headerbuff = newbuff;
@@ -274,7 +274,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) {
failf (data, "Failed to alloc memory for big header!");
- return CURLE_READ_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
data->state.headersize= newsize;
data->state.headerbuff = newbuff;
@@ -696,7 +696,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
return CURLE_WRITE_ERROR;
}
failf(data, "Received problem in the chunky parser");
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
else if(CHUNKE_STOP == res) {
/* we're done reading chunks! */
diff --git a/lib/url.c b/lib/url.c
index b7233c074..0859dead1 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -950,7 +950,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
break;
default:
/* unknown tag and its companion, just ignore: */
- return CURLE_READ_ERROR; /* correct this */
+ return CURLE_FAILED_INIT; /* correct this */
}
return CURLE_OK;
}
@@ -2363,7 +2363,7 @@ CURLcode Curl_do(struct connectdata **connp)
/* This was formerly done in transfer.c, but we better do it here */
- if((CURLE_WRITE_ERROR == result) && conn->bits.reuse) {
+ if((CURLE_SEND_ERROR == result) && conn->bits.reuse) {
/* This was a re-use of a connection and we got a write error in the
* DO-phase. Then we DISCONNECT this connection and have another attempt
* to CONNECT and then DO again! The retry cannot possibly find another