diff options
Diffstat (limited to 'vio/viossl.c')
-rw-r--r-- | vio/viossl.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/vio/viossl.c b/vio/viossl.c index 5600bc1a800..696d7d54a29 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -23,10 +23,11 @@ */ #include <global.h> +#include <mysql_com.h> #include <errno.h> #include <assert.h> -#include <vio.h> +#include <violite.h> #include <my_sys.h> #include <my_net.h> #include <m_string.h> @@ -62,7 +63,7 @@ #ifdef HAVE_OPENSSL -void vio_ssl_delete(st_vio * vio) +void vio_ssl_delete(Vio * vio) { /* It must be safe to delete null pointers. */ /* This matches the semantics of C++'s delete operator. */ @@ -74,13 +75,13 @@ void vio_ssl_delete(st_vio * vio) } } -int vio_ssl_errno(st_vio *vio __attribute__((unused))) +int vio_ssl_errno(Vio *vio __attribute__((unused))) { return errno; /* On Win32 this mapped to WSAGetLastError() */ } -int vio_ssl_read(st_vio * vio, gptr buf, int size) +int vio_ssl_read(Vio * vio, gptr buf, int size) { int r; DBUG_ENTER("vio_ssl_read"); @@ -96,7 +97,7 @@ int vio_ssl_read(st_vio * vio, gptr buf, int size) } -int vio_ssl_write(st_vio * vio, const gptr buf, int size) +int vio_ssl_write(Vio * vio, const gptr buf, int size) { int r; DBUG_ENTER("vio_ssl_write"); @@ -112,7 +113,7 @@ int vio_ssl_write(st_vio * vio, const gptr buf, int size) } -int vio_ssl_fastsend(st_vio * vio __attribute__((unused))) +int vio_ssl_fastsend(Vio * vio __attribute__((unused))) { int r=0; DBUG_ENTER("vio_ssl_fastsend"); @@ -138,7 +139,7 @@ int vio_ssl_fastsend(st_vio * vio __attribute__((unused))) DBUG_RETURN(r); } -int vio_ssl_keepalive(st_vio* vio, my_bool set_keep_alive) +int vio_ssl_keepalive(Vio* vio, my_bool set_keep_alive) { int r=0; uint opt = 0; @@ -157,14 +158,14 @@ int vio_ssl_keepalive(st_vio* vio, my_bool set_keep_alive) my_bool -vio_ssl_should_retry(st_vio * vio __attribute__((unused))) +vio_ssl_should_retry(Vio * vio __attribute__((unused))) { int en = errno; return en == EAGAIN || en == EINTR || en == EWOULDBLOCK; } -int vio_ssl_close(st_vio * vio) +int vio_ssl_close(Vio * vio) { int r; DBUG_ENTER("vio_ssl_close"); @@ -191,23 +192,23 @@ int vio_ssl_close(st_vio * vio) } -const char *vio_ssl_description(st_vio * vio) +const char *vio_ssl_description(Vio * vio) { return vio->desc; } -enum enum_vio_type vio_ssl_type(st_vio* vio) +enum enum_vio_type vio_ssl_type(Vio* vio) { return vio->type; } -my_socket vio_ssl_fd(st_vio* vio) +my_socket vio_ssl_fd(Vio* vio) { return vio->sd; } -my_bool vio_ssl_peer_addr(st_vio * vio, char *buf) +my_bool vio_ssl_peer_addr(Vio * vio, char *buf) { DBUG_ENTER("vio_ssl_peer_addr"); DBUG_PRINT("enter", ("sd=%d", vio->sd)); @@ -232,7 +233,7 @@ my_bool vio_ssl_peer_addr(st_vio * vio, char *buf) } -void vio_ssl_in_addr(st_vio *vio, struct in_addr *in) +void vio_ssl_in_addr(Vio *vio, struct in_addr *in) { DBUG_ENTER("vio_ssl_in_addr"); if (vio->localhost) @@ -245,7 +246,7 @@ void vio_ssl_in_addr(st_vio *vio, struct in_addr *in) /* Return 0 if there is data to be read */ -my_bool vio_ssl_poll_read(st_vio *vio,uint timeout) +my_bool vio_ssl_poll_read(Vio *vio,uint timeout) { #ifndef HAVE_POLL return 0; @@ -286,7 +287,7 @@ report_errors() /* FIXME: There are some duplicate code in * sslaccept()/sslconnect() which maybe can be eliminated */ -struct st_vio *sslaccept(struct st_VioSSLAcceptorFd* ptr, struct st_vio* sd) +Vio *sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* sd) { DBUG_ENTER("sslaccept"); DBUG_PRINT("enter", ("sd=%s ptr=%p", sd->desc,ptr)); @@ -319,7 +320,7 @@ struct st_vio *sslaccept(struct st_VioSSLAcceptorFd* ptr, struct st_vio* sd) DBUG_RETURN(sd); } -struct st_vio *sslconnect(struct st_VioSSLConnectorFd* ptr, struct st_vio* sd) +Vio *sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* sd) { DBUG_ENTER("sslconnect"); DBUG_PRINT("enter", ("sd=%s ptr=%p ctx: %p", sd->desc,ptr,ptr->ssl_context_)); |