summaryrefslogtreecommitdiff
path: root/vio/vio.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-11-20 13:09:50 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-11-20 13:09:50 +0100
commit26a37b36efe214e8976a9412fea405b599bd4ac9 (patch)
tree2c18fd6723ebeec1222f83761440fd907e120eb1 /vio/vio.c
parent2f78abd21b11aa53fc8426c018b78621f77157f7 (diff)
downloadmariadb-git-26a37b36efe214e8976a9412fea405b599bd4ac9.tar.gz
Bug#47571 : idle named pipe connection is unkillable
implement Davi's review suggestions (post-push fixes) include/violite.h: Use official abbreviation for milliseconds (ms) sql/mysqld.cc: Fix formatting Add error handling for the case of CreateEvent error vio/vio.c: Use official abbreviation for milliseconds(ms) Remove superfluous memset Fix formatting vio/viosocket.c: Use official abbreviation for milliseconds (ms) Use size_t datatype instead of int in pipe_complete_io
Diffstat (limited to 'vio/vio.c')
-rw-r--r--vio/vio.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/vio/vio.c b/vio/vio.c
index fd8e2e5a402..4253651bf84 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -62,10 +62,8 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
vio->timeout=vio_win32_timeout;
/* Set default timeout */
- vio->read_timeout_millis = INFINITE;
- vio->write_timeout_millis = INFINITE;
-
- memset(&(vio->pipe_overlapped), 0, sizeof(OVERLAPPED));
+ vio->read_timeout_ms= INFINITE;
+ vio->write_timeout_ms= INFINITE;
vio->pipe_overlapped.hEvent= CreateEvent(NULL, TRUE, FALSE, NULL);
DBUG_VOID_RETURN;
}
@@ -90,8 +88,8 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
/* Currently, shared memory is on Windows only, hence the below is ok*/
vio->timeout= vio_win32_timeout;
/* Set default timeout */
- vio->read_timeout_millis= INFINITE;
- vio->write_timeout_millis= INFINITE;
+ vio->read_timeout_ms= INFINITE;
+ vio->write_timeout_ms= INFINITE;
DBUG_VOID_RETURN;
}
#endif
@@ -115,22 +113,20 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
DBUG_VOID_RETURN;
}
#endif /* HAVE_OPENSSL */
- {
- vio->viodelete =vio_delete;
- vio->vioerrno =vio_errno;
- vio->read= (flags & VIO_BUFFERED_READ) ? vio_read_buff : vio_read;
- vio->write =vio_write;
- vio->fastsend =vio_fastsend;
- vio->viokeepalive =vio_keepalive;
- vio->should_retry =vio_should_retry;
- vio->was_interrupted=vio_was_interrupted;
- vio->vioclose =vio_close;
- vio->peer_addr =vio_peer_addr;
- vio->in_addr =vio_in_addr;
- vio->vioblocking =vio_blocking;
- vio->is_blocking =vio_is_blocking;
- vio->timeout =vio_timeout;
- }
+ vio->viodelete =vio_delete;
+ vio->vioerrno =vio_errno;
+ vio->read= (flags & VIO_BUFFERED_READ) ? vio_read_buff : vio_read;
+ vio->write =vio_write;
+ vio->fastsend =vio_fastsend;
+ vio->viokeepalive =vio_keepalive;
+ vio->should_retry =vio_should_retry;
+ vio->was_interrupted=vio_was_interrupted;
+ vio->vioclose =vio_close;
+ vio->peer_addr =vio_peer_addr;
+ vio->in_addr =vio_in_addr;
+ vio->vioblocking =vio_blocking;
+ vio->is_blocking =vio_is_blocking;
+ vio->timeout =vio_timeout;
DBUG_VOID_RETURN;
}