freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Timeout for reading from the server doesn't work.
- From: Omar Siam <simar AT gmx.net>
- To: FreeTDS AT lists.ibiblio.org
- Subject: [freetds] Timeout for reading from the server doesn't work.
- Date: Tue, 22 Nov 2005 00:05:03 +0100
Dear list,
I use this great library (libtds) to communicate with MSSQL server on an
embedded system. It's rather important that this system never stops
sending data for a longer period of time. But as far as I could observe
this occurs every time the server becomes unreachable. In both the
stable release and the CVS version a timeout can be set for this case,
but in the stable version this triggers an assertion and in the CVS
version as far as I understand the code it leads to an infinite loop.
For the latter case there is a rather simple fix which makes the
goodread function abort instead of waiting forever. I only insert data
into the database but this has worked reliably now for the last 4 days.
best regards
Omar Siam
Index: src/tds/net.c =================================================================== RCS file: /cvsroot/freetds/freetds/src/tds/net.c,v retrieving revision 1.34 diff --unified -r1.34 net.c --- src/tds/net.c 7 Oct 2005 15:07:27 -0000 1.34 +++ src/tds/net.c 21 Nov 2005 23:02:54 -0000 @@ -320,7 +320,7 @@ } } - if (len < 0) { + if (len <= 0) { switch(sock_errno) { case TDSSOCK_EINTR: tdsdump_log(TDS_DBG_NETWORK, "socket read interrupted\n");
-
[freetds] Timeout for reading from the server doesn't work.,
Omar Siam, 11/21/2005
- <Possible follow-up(s)>
- Re: [freetds] Timeout for reading from the server doesn't work., ZIGLIO, Frediano, VF-IT, 11/24/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
ZIGLIO, Frediano, VF-IT, 11/24/2005
-
[freetds] Problems with upgrade to 0.63 php-5.0.5,
Aliet Santiesteban Sifontes, 11/24/2005
-
Re: [freetds] Problems with upgrade to 0.63 php-5.0.5,
Allan Kim, 11/28/2005
- Re: [freetds] Problems with upgrade to 0.63 php-5.0.5, Aliet Santiesteban Sifontes, 11/28/2005
-
Re: [freetds] Problems with upgrade to 0.63 php-5.0.5,
Allan Kim, 11/28/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
James K. Lowden, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
Frediano Ziglio, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
James K. Lowden, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
entropy, 11/26/2005
- Re: [freetds] Timeout for reading from the server doesn't work., James K. Lowden, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
entropy, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
James K. Lowden, 11/26/2005
-
Re: [freetds] Timeout for reading from the server doesn't work.,
Frediano Ziglio, 11/26/2005
-
[freetds] Problems with upgrade to 0.63 php-5.0.5,
Aliet Santiesteban Sifontes, 11/24/2005
Archive powered by MHonArc 2.6.24.