src/server/daemon/sessionhandler.c

changeset 141
ff311b63c3af
parent 135
471e28cca288
child 142
55298bc9ed28
equal deleted inserted replaced
140:93247a579184 141:ff311b63c3af
59 59
60 int connection_ssl_read(Connection *conn, void *buf, int len) { 60 int connection_ssl_read(Connection *conn, void *buf, int len) {
61 int ret = SSL_read(conn->ssl, buf, len); 61 int ret = SSL_read(conn->ssl, buf, len);
62 if(ret <= 0) { 62 if(ret <= 0) {
63 conn->ssl_error = SSL_get_error(conn->ssl, ret); 63 conn->ssl_error = SSL_get_error(conn->ssl, ret);
64 if(conn->ssl_error == SSL_ERROR_SYSCALL) {
65 log_ereport(
66 LOG_VERBOSE,
67 "Connection: %d: SSL_read failed: %s",
68 (int)conn,
69 strerror(errno));
70 }
64 } 71 }
65 return ret; 72 return ret;
66 } 73 }
67 74
68 int connection_ssl_write(Connection *conn, const void *buf, int len) { 75 int connection_ssl_write(Connection *conn, const void *buf, int len) {
69 int ret = SSL_write(conn->ssl, buf, len); 76 int ret = SSL_write(conn->ssl, buf, len);
70 if(ret <= 0) { 77 if(ret <= 0) {
71 conn->ssl_error = SSL_get_error(conn->ssl, ret); 78 conn->ssl_error = SSL_get_error(conn->ssl, ret);
79 if(conn->ssl_error == SSL_ERROR_SYSCALL) {
80 log_ereport(
81 LOG_VERBOSE,
82 "Connection: %d: SSL_write failed: %s",
83 (int)conn,
84 strerror(errno));
85 }
72 } 86 }
73 return ret; 87 return ret;
74 } 88 }
75 89
76 void connection_ssl_close(Connection *conn) { 90 void connection_ssl_close(Connection *conn) {

mercurial