src/server/daemon/sessionhandler.c

changeset 129
fd324464f56f
parent 128
288fd9b9a739
child 133
87b405d61f64
equal deleted inserted replaced
128:288fd9b9a739 129:fd324464f56f
58 } 58 }
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(); 63 conn->ssl_error = ERR_get_error();
64 } 64 }
65 return ret; 65 return ret;
66 } 66 }
67 67
68 int connection_ssl_write(Connection *conn, const void *buf, int len) { 68 int connection_ssl_write(Connection *conn, const void *buf, int len) {
69 int ret = SSL_write(conn->ssl, buf, len); 69 int ret = SSL_write(conn->ssl, buf, len);
70 if(ret <= 0) { 70 if(ret <= 0) {
71 conn->ssl_error = SSL_get_error(); 71 conn->ssl_error = ERR_get_error();
72 } 72 }
73 return ret; 73 return ret;
74 } 74 }
75 75
76 void connection_ssl_close(Connection *conn) { 76 void connection_ssl_close(Connection *conn) {

mercurial