summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-08-11 12:11:07 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2020-09-01 21:30:52 +0200
commit32a29afea777d8bbfcea7a2b5e6e5ee674013cb5 (patch)
tree07bf60d71eff90b3b48c0b6e0f95cdf4e78f9e30 /vio/viossl.c
parent72f0f0db9caaca6da7b9b35d60faa09b132442ec (diff)
downloadmariadb-git-32a29afea777d8bbfcea7a2b5e6e5ee674013cb5.tar.gz
MDEV-23238 - remove async client from server code.
It is already in libmariadb, and server (also that client in server) does not need it. It does not work in embedded either since it relies on non-blocking sockets
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c47
1 files changed, 17 insertions, 30 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index a5b3396953e..04bc0e41ae9 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -21,8 +21,6 @@
*/
#include "vio_priv.h"
-#include "my_context.h"
-#include <mysql_async.h>
#ifdef HAVE_OPENSSL
@@ -129,21 +127,17 @@ size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size)
(int)mysql_socket_getfd(vio->mysql_socket), buf, size,
vio->ssl_arg));
- if (vio->async_context && vio->async_context->active)
- ret= my_ssl_read_async(vio->async_context, (SSL *)vio->ssl_arg, buf, (int)size);
- else
+
+ while ((ret= SSL_read(ssl, buf, (int)size)) < 0)
{
- while ((ret= SSL_read(ssl, buf, (int)size)) < 0)
- {
- enum enum_vio_io_event event;
+ enum enum_vio_io_event event;
- /* Process the SSL I/O error. */
- if (!ssl_should_retry(vio, ret, &event))
- break;
- /* Attempt to wait for an I/O event. */
- if (vio_socket_io_wait(vio, event))
- break;
- }
+ /* Process the SSL I/O error. */
+ if (!ssl_should_retry(vio, ret, &event))
+ break;
+ /* Attempt to wait for an I/O event. */
+ if (vio_socket_io_wait(vio, event))
+ break;
}
DBUG_PRINT("exit", ("%d", (int) ret));
@@ -160,24 +154,17 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu",
(int)mysql_socket_getfd(vio->mysql_socket),
buf, size));
-
- if (vio->async_context && vio->async_context->active)
- ret= my_ssl_write_async(vio->async_context, (SSL *)vio->ssl_arg, buf,
- (int)size);
- else
+ while ((ret= SSL_write(ssl, buf, (int)size)) < 0)
{
- while ((ret= SSL_write(ssl, buf, (int)size)) < 0)
- {
- enum enum_vio_io_event event;
+ enum enum_vio_io_event event;
- /* Process the SSL I/O error. */
- if (!ssl_should_retry(vio, ret, &event))
- break;
+ /* Process the SSL I/O error. */
+ if (!ssl_should_retry(vio, ret, &event))
+ break;
- /* Attempt to wait for an I/O event. */
- if (vio_socket_io_wait(vio, event))
- break;
- }
+ /* Attempt to wait for an I/O event. */
+ if (vio_socket_io_wait(vio, event))
+ break;
}
DBUG_RETURN(ret < 0 ? -1 : ret);