summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/violite.h8
-rw-r--r--vio/vio.c2
-rw-r--r--vio/viossl.c24
3 files changed, 1 insertions, 33 deletions
diff --git a/include/violite.h b/include/violite.h
index d5f697b26c4..9a2146c1978 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -102,9 +102,6 @@ my_bool vio_peer_addr(Vio* vio, char *buf);
void vio_in_addr(Vio *vio, struct in_addr *in);
- /* Return 1 if there is data to be read */
-my_bool vio_poll_read(Vio *vio,uint timeout);
-
#ifdef __cplusplus
}
#endif
@@ -122,7 +119,6 @@ my_bool vio_poll_read(Vio *vio,uint timeout);
#define vio_close(vio) ((vio)->vioclose)(vio)
#define vio_peer_addr(vio, buf) (vio)->peer_addr(vio, buf)
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
-#define vio_poll_read(vio,timeout) (vio)->poll_read(vio,timeout)
#endif /* defined(HAVE_VIO) && !defined(DONT_MAP_VIO) */
#ifdef HAVE_OPENSSL
@@ -155,9 +151,6 @@ int vio_ssl_errno(Vio *vio);
my_bool vio_ssl_peer_addr(Vio* vio, char *buf);
void vio_ssl_in_addr(Vio *vio, struct in_addr *in);
-/* Return 1 if there is data to be read */
-my_bool vio_ssl_poll_read(Vio *vio,uint timeout);
-
/* Single copy for server */
struct st_VioSSLAcceptorFd
{
@@ -227,7 +220,6 @@ struct st_vio
void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*);
int (*vioclose)(Vio*);
- my_bool (*poll_read)(Vio*,uint);
#ifdef HAVE_OPENSSL
SSL* ssl_;
diff --git a/vio/vio.c b/vio/vio.c
index 759f9416ddf..6fe0be20906 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -60,7 +60,6 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
vio->vioclose =vio_ssl_close;
vio->peer_addr =vio_ssl_peer_addr;
vio->in_addr =vio_ssl_in_addr;
- vio->poll_read =vio_ssl_poll_read;
vio->vioblocking =vio_blocking;
vio->is_blocking =vio_is_blocking;
}
@@ -77,7 +76,6 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
vio->vioclose =vio_close;
vio->peer_addr =vio_peer_addr;
vio->in_addr =vio_in_addr;
- vio->poll_read =vio_poll_read;
vio->vioblocking =vio_blocking;
vio->is_blocking =vio_is_blocking;
}
diff --git a/vio/viossl.c b/vio/viossl.c
index c87836e56b6..e6c1cd31e41 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -255,32 +255,11 @@ void vio_ssl_in_addr(Vio *vio, struct in_addr *in)
}
-/* Return 0 if there is data to be read */
-
-my_bool vio_ssl_poll_read(Vio *vio,uint timeout)
-{
-#ifndef HAVE_POLL
- return 0;
-#else
- struct pollfd fds;
- int res;
- DBUG_ENTER("vio_ssl_poll");
- fds.fd=vio->sd;
- fds.events=POLLIN;
- fds.revents=0;
- if ((res=poll(&fds,1,(int) timeout*1000)) <= 0)
- {
- DBUG_RETURN(res < 0 ? 0 : 1); /* Don't return 1 on errors */
- }
- DBUG_RETURN(fds.revents & POLLIN ? 0 : 1);
-#endif
-}
-
void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
{
- X509* client_cert;
char *str;
char buf[1024];
+ X509* client_cert;
DBUG_ENTER("sslaccept");
DBUG_PRINT("enter", ("sd=%d ptr=%p", vio->sd,ptr));
vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE);
@@ -339,7 +318,6 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
DBUG_ENTER("sslconnect");
DBUG_PRINT("enter", ("sd=%d ptr=%p ctx: %p", vio->sd,ptr,ptr->ssl_context_));
vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE);
-
vio->ssl_=0;
vio->open_=FALSE;
if (!(vio->ssl_ = SSL_new(ptr->ssl_context_)))