summaryrefslogtreecommitdiff
path: root/vio/viosocket.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-27 02:51:39 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-27 02:51:39 +0300
commit59806e1004d205bae01673fe7ed9a60537112455 (patch)
treedf46d43bd0139e95a2e8a1f4acac68f2de3c484f /vio/viosocket.c
parente5b3d521f57d020139af268d157d941a7e5ec310 (diff)
downloadmariadb-git-59806e1004d205bae01673fe7ed9a60537112455.tar.gz
vio ssl structure renames (to get rid of ending _)
Added TCP/IP read/write timeout for windows Check on windows if second server is started with same TCP/IP port BitKeeper/deleted/.del-have_openssl_2.inc~8c9f1a45676b698f: Delete: mysql-test/include/have_openssl_2.inc BitKeeper/deleted/.del-have_openssl_2.require~53bbdfc136fb514: Delete: mysql-test/r/have_openssl_2.require BitKeeper/deleted/.del-openssl_2.test~f2dfa927f19d14f8: Delete: mysql-test/t/openssl_2.test BitKeeper/etc/ignore: added libmysql/vio_priv.h libmysql_r/vio_priv.h client/mysql.cc: vio ssl structure renames include/violite.h: Cleanup violite.h interface (move things to vio_priv.h) libmysql/Makefile.am: Use vio_priv.h libmysql/Makefile.shared: Use vio_priv.h libmysqld/lib_vio.c: Added timeout for windows mysys/my_getopt.c: Indentaion cleanup sql/item_cmpfunc.cc: Remove compiler warnings sql/item_func.cc: Remove compiler warnings sql/mini_client.cc: vio ssl structure renames sql/mysqld.cc: Check on windows if second server is started with same TCP/IP port sql/net_serv.cc: Add read/write timeouts for windows sql/sql_acl.cc: vio ssl structure renames sql/sql_show.cc: vio ssl structure renames vio/vio.c: Added timeouts for windows vio/viosocket.c: Added timeouts for windows vio/viossl.c: Added timeouts for windows Cleaned up structure element names vio/viosslfactories.c: Added timeouts for windows Cleaned up structure element names
Diffstat (limited to 'vio/viosocket.c')
-rw-r--r--vio/viosocket.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 6f5c4142a45..ad156fc33bf 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -21,19 +21,7 @@
the file descriptior.
*/
-#define DONT_MAP_VIO
-#include <my_global.h>
-#include <mysql_com.h>
-
-#include <errno.h>
-#include <my_sys.h>
-#include <violite.h>
-#include <my_net.h>
-#include <m_string.h>
-
-#ifndef __WIN__
-#define HANDLE void *
-#endif
+#include "vio_priv.h"
void vio_delete(Vio* vio)
{
@@ -334,3 +322,14 @@ my_bool vio_poll_read(Vio *vio,uint timeout)
DBUG_RETURN(fds.revents & POLLIN ? 0 : 1);
#endif
}
+
+
+void vio_timeout(Vio *vio __attribute__((unused)),
+ uint timeout __attribute__((unused)))
+{
+#ifdef __WIN__
+ ulong wait_timeout= (ulong) timeout * 1000;
+ (void) setsockopt(vio->sd, SOL_SOCKET, SO_RCVTIMEO, (char*) &wait_timeout,
+ sizeof(wait_timeout));
+#endif /* __WIN__ */
+}