freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Patch to use configured connection timeout
- From: Jan Blom <jan.blom AT peopleinteractive.se>
- To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
- Subject: [freetds] Patch to use configured connection timeout
- Date: Mon, 18 Apr 2016 20:36:52 +0000
Hello,
Using FreeTDS 0.95 in combination with unixODBC I notice that the connection
timeout value configured in freetds.conf is never used when calling
SQLDriverConnect. The attached patch makes us use the value from freetds.conf
if we don't call SQLSetConnectAttr with SQL_ATTR_CONNECTION_TIMEOUT.
The change is rather trivial. Let me know if you want me to produce a patch
against head. Looking at the 1.0RC1 code it seems the issue is still present.
Best regards,
Jan Blom
--- freetds-0.95.81/src/odbc/odbc.c 2015-10-15 11:00:01.000000000 +0200
+++ freetds-0.95.81_patched/src/odbc/odbc.c 2016-04-18 22:08:50.692892606
+0200
@@ -379,7 +379,11 @@
tds_fix_login(login);
- login->connect_timeout = dbc->attr.connection_timeout;
+ /* use connection timeout if set */
+ if (dbc->attr.connection_timeout != 0) {
+ login->connect_timeout = dbc->attr.connection_timeout;
+ }
+
if (dbc->attr.mars_enabled != SQL_MARS_ENABLED_NO)
login->mars = 1;
-
[freetds] Patch to use configured connection timeout,
Jan Blom, 04/18/2016
-
Re: [freetds] Patch to use configured connection timeout,
Frediano Ziglio, 04/19/2016
-
Re: [freetds] Patch to use configured connection timeout,
Jan Blom, 04/19/2016
- Re: [freetds] Patch to use configured connection timeout, Frediano Ziglio, 04/19/2016
-
Re: [freetds] Patch to use configured connection timeout,
Jan Blom, 04/19/2016
-
Re: [freetds] Patch to use configured connection timeout,
Frediano Ziglio, 04/19/2016
Archive powered by MHonArc 2.6.24.