From 8d2db0486dcc167f1b02d4454ebf4624ce03e1de Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 2 Sep 2014 16:49:04 +0200 Subject: [PATCH] Fix tv_usec calculation This bug was introduced in the MSVC patches. Signed-off-by: Johannes Schindelin --- libvncclient/tls_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvncclient/tls_openssl.c b/libvncclient/tls_openssl.c index 669913d..00d031d 100644 --- a/libvncclient/tls_openssl.c +++ b/libvncclient/tls_openssl.c @@ -222,7 +222,7 @@ static int sock_read_ready(SSL *ssl, uint32_t ms) FD_SET(SSL_get_fd(ssl), &fds); tv.tv_sec = ms / 1000; - tv.tv_usec = (ms % 1000) * ms; + tv.tv_usec = (ms % 1000) * 1000; r = select (SSL_get_fd(ssl) + 1, &fds, NULL, NULL, &tv);