mirror of
https://github.com/curl/curl.git
synced 2026-08-26 18:13:37 +03:00
cleaned up Curl_write() and the sub functions it uses for various protocols.
They all now return ssize_t to Curl_write(). Unfortunately, Curl_read() is in a sorrier state but it too would benefit from a similar cleanup.
This commit is contained in:
parent
4eb35406f4
commit
be0d17e812
8 changed files with 79 additions and 66 deletions
16
lib/sslgen.c
16
lib/sslgen.c
|
|
@ -455,10 +455,10 @@ struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
|
|||
}
|
||||
|
||||
/* return number of sent (non-SSL) bytes */
|
||||
int Curl_ssl_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
void *mem,
|
||||
size_t len)
|
||||
ssize_t Curl_ssl_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
void *mem,
|
||||
size_t len)
|
||||
{
|
||||
#ifdef USE_SSLEAY
|
||||
return Curl_ossl_send(conn, sockindex, mem, len);
|
||||
|
|
@ -481,10 +481,10 @@ int Curl_ssl_send(struct connectdata *conn,
|
|||
* If the read would block (EWOULDBLOCK) we return -1. Otherwise we return
|
||||
* a regular CURLcode value.
|
||||
*/
|
||||
int Curl_ssl_recv(struct connectdata *conn, /* connection data */
|
||||
int sockindex, /* socketindex */
|
||||
char *mem, /* store read data here */
|
||||
size_t len) /* max amount to read */
|
||||
ssize_t Curl_ssl_recv(struct connectdata *conn, /* connection data */
|
||||
int sockindex, /* socketindex */
|
||||
char *mem, /* store read data here */
|
||||
size_t len) /* max amount to read */
|
||||
{
|
||||
#ifdef USE_SSL
|
||||
ssize_t nread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue