summaryrefslogtreecommitdiff
path: root/vio/vio.c
diff options
context:
space:
mode:
Diffstat (limited to 'vio/vio.c')
-rw-r--r--vio/vio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/vio.c b/vio/vio.c
index c47671d0e23..96cb0c31ef6 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -66,12 +66,16 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
my_socket sd, HANDLE hPipe,
my_bool localhost)
{
+ DBUG_ENTER("vio_reset");
+ DBUG_PRINT("enter", ("type=%d sd=%d localhost=%d", type, sd, localhost));
+
bzero((char*) vio, sizeof(*vio));
vio->type = type;
vio->sd = sd;
vio->hPipe = hPipe;
vio->localhost= localhost;
#ifdef HAVE_VIO
+#ifdef HAVE_OPENSSL
if (type == VIO_TYPE_SSL)
{
vio->viodelete =vio_ssl_delete;
@@ -85,8 +89,11 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
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;
}
else /* default is VIO_TYPE_TCPIP */
+#endif /* HAVE_OPENSSL */
{
vio->viodelete =vio_delete;
vio->vioerrno =vio_errno;
@@ -99,8 +106,11 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
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;
}
#endif /* HAVE_VIO */
+ DBUG_VOID_RETURN;
}
/* Open the socket or TCP/IP connection and read the fnctl() status */