diff options
author | SergeyV@selena. <> | 2005-09-07 15:57:14 +0400 |
---|---|---|
committer | SergeyV@selena. <> | 2005-09-07 15:57:14 +0400 |
commit | 33c3fedadc266c039cb0482687dc3f59a8e6e844 (patch) | |
tree | bcf60553d2cda3c381a8cd81327d8f8cbfd032f9 /vio | |
parent | 784582b857a5538be9c780a0985ece10baa9825e (diff) | |
download | mariadb-git-33c3fedadc266c039cb0482687dc3f59a8e6e844.tar.gz |
Fixes bug #5588. Additions after merge from 4.0.
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio.c | 4 | ||||
-rw-r--r-- | vio/vio_priv.h | 2 | ||||
-rw-r--r-- | vio/viosocket.c | 4 | ||||
-rw-r--r-- | vio/viossl.c | 9 |
4 files changed, 16 insertions, 3 deletions
diff --git a/vio/vio.c b/vio/vio.c index 2d5cb711ffc..45572b93ed6 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -50,6 +50,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type, vio->fastsend =vio_fastsend; vio->viokeepalive =vio_keepalive; vio->should_retry =vio_should_retry; + vio->was_interrupted=vio_was_interrupted; vio->vioclose =vio_close_pipe; vio->peer_addr =vio_peer_addr; vio->in_addr =vio_in_addr; @@ -69,6 +70,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type, vio->fastsend =vio_fastsend; vio->viokeepalive =vio_keepalive; vio->should_retry =vio_should_retry; + vio->was_interrupted=vio_was_interrupted; vio->vioclose =vio_close_shared_memory; vio->peer_addr =vio_peer_addr; vio->in_addr =vio_in_addr; @@ -88,7 +90,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type, vio->fastsend =vio_ssl_fastsend; vio->viokeepalive =vio_ssl_keepalive; vio->should_retry =vio_ssl_should_retry; - vio->was_interrupted=vio_was_interrupted; + vio->was_interrupted=vio_ssl_was_interrupted; vio->vioclose =vio_ssl_close; vio->peer_addr =vio_ssl_peer_addr; vio->in_addr =vio_ssl_in_addr; diff --git a/vio/vio_priv.h b/vio/vio_priv.h index 3a75a08021d..c1c78cc6efa 100644 --- a/vio/vio_priv.h +++ b/vio/vio_priv.h @@ -39,6 +39,8 @@ int vio_ssl_fastsend(Vio *vio); int vio_ssl_keepalive(Vio *vio, my_bool onoff); /* Whenever we should retry the last read/write operation. */ my_bool vio_ssl_should_retry(Vio *vio); +/* Check that operation was timed out */ +my_bool vio_ssl_was_interrupted(Vio *vio); /* When the workday is over... */ int vio_ssl_close(Vio *vio); /* Return last error number */ diff --git a/vio/viosocket.c b/vio/viosocket.c index ca384a57967..0f1abfeea46 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -197,9 +197,9 @@ vio_should_retry(Vio * vio __attribute__((unused))) my_bool -vio_was_interrupted(Vio * vio __attribute__((unused))) +vio_was_interrupted(Vio *vio __attribute__((unused))) { - int en = socket_errno; + int en= socket_errno; return (en == SOCKET_EAGAIN || en == SOCKET_EINTR || en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT); } diff --git a/vio/viossl.c b/vio/viossl.c index 2f608209a53..a3a2e7190bd 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -184,6 +184,15 @@ vio_ssl_should_retry(Vio * vio __attribute__((unused))) } +my_bool +vio_ssl_was_interrupted(Vio *vio __attribute__((unused))) +{ + int en= socket_errno; + return (en == SOCKET_EAGAIN || en == SOCKET_EINTR || + en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT); +} + + int vio_ssl_close(Vio * vio) { int r; |