remove messages about incomplete writes
move 2 log messages to after EOF
clean up some whitespace
@@ -792,8 +792,6 @@ conn_write_ssl(struct xfrd_tcp* tcp, SSL* ssl)
request_length);
switch(SSL_get_error(ssl,sent)) {
case SSL_ERROR_NONE:
- if(request_length != sent)
- log_msg(LOG_INFO, "xfrd: incomplete write of tls");
break;
default:
log_msg(LOG_ERR, "xfrd: generic write problem with tls");
@@ -825,8 +823,6 @@ conn_write_ssl(struct xfrd_tcp* tcp, SSL* ssl)
sent = SSL_write(ssl, buffer_current(tcp->packet), request_length);
switch(SSL_get_error(ssl,sent)) {
case SSL_ERROR_NONE:
- if(request_length != sent)
- log_msg(LOG_INFO, "xfrd: incomplete write of tls");
break;
default:
log_msg(LOG_ERR, "xfrd: generic write problem with tls");
@@ -1015,11 +1011,11 @@ conn_read_ssl(struct xfrd_tcp* tcp, SSL* ssl)
if(err == SSL_ERROR_WANT_READ && errno == EAGAIN) {
return 0;
}
- log_msg(LOG_INFO, "ssl_read returned error %d with received %zd", err, received, errno);
if(err == SSL_ERROR_ZERO_RETURN) {
/* EOF */
return 0;
}
+ log_msg(LOG_ERR, "ssl_read returned error %d with received %zd", err, received, errno);
}
if(received == -1) {
if(errno == EAGAIN || errno == EINTR) {
@@ -1064,11 +1060,11 @@ conn_read_ssl(struct xfrd_tcp* tcp, SSL* ssl)
if (received <= 0) {
int err = SSL_get_error(ssl, received);
- log_msg(LOG_ERR, "ssl_read returned error %d with received %zd", err, received);
if(err == SSL_ERROR_ZERO_RETURN) {
/* EOF */
return 0;
}
+ log_msg(LOG_ERR, "ssl_read returned error %d with received %zd", err, received);
}
if(received == -1) {
if(errno == EAGAIN || errno == EINTR) {
