mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Minor edit to avoid an unreachable break and to remove the extra {} body
within the switch.
This commit is contained in:
parent
cf004cbc7e
commit
c39c55cb2d
15
lib/sendf.c
15
lib/sendf.c
@ -236,6 +236,9 @@ CURLcode Curl_write(struct connectdata *conn,
|
|||||||
'size_t' */
|
'size_t' */
|
||||||
if (conn->ssl[num].use) {
|
if (conn->ssl[num].use) {
|
||||||
int err;
|
int err;
|
||||||
|
char error_buffer[120]; /* OpenSSL documents that this must be at least
|
||||||
|
120 bytes long. */
|
||||||
|
int sslerror;
|
||||||
int rc = SSL_write(conn->ssl[num].handle, mem, len);
|
int rc = SSL_write(conn->ssl[num].handle, mem, len);
|
||||||
|
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
@ -254,18 +257,12 @@ CURLcode Curl_write(struct connectdata *conn,
|
|||||||
Curl_ourerrno());
|
Curl_ourerrno());
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
case SSL_ERROR_SSL:
|
case SSL_ERROR_SSL:
|
||||||
{
|
/* A failure in the SSL library occurred, usually a protocol error.
|
||||||
/* A failure in the SSL library occurred, usually a
|
The OpenSSL error queue contains more information on the error. */
|
||||||
protocol error. The OpenSSL error queue contains more
|
sslerror = ERR_get_error();
|
||||||
information on the error. */
|
|
||||||
char error_buffer[120]; /* OpenSSL documents that this must be at least
|
|
||||||
120 bytes long. */
|
|
||||||
int sslerror = ERR_get_error();
|
|
||||||
failf(conn->data, "SSL_write() error: %s\n",
|
failf(conn->data, "SSL_write() error: %s\n",
|
||||||
ERR_error_string(sslerror, error_buffer));
|
ERR_error_string(sslerror, error_buffer));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
/* a true error */
|
/* a true error */
|
||||||
failf(conn->data, "SSL_write() return error %d\n", err);
|
failf(conn->data, "SSL_write() return error %d\n", err);
|
||||||
|
Loading…
Reference in New Issue
Block a user