Skip to Content.
Sympa Menu

freetds - [freetds] rerun autogen.sh, and login timeouts

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] rerun autogen.sh, and login timeouts
  • Date: Tue, 10 Dec 2002 00:40:06 -0500

I updated configure.in to test for another header file. If you're using
CVS, you'll want to regenerate your configure script.

The connection logic in tds/login.c now works as intended. Unfortunately,
it still doesn't work as specified.

The db-lib docs say (cf. dbsetlogintime) that if we find a machine on the
network but are unable to connect to the port, we should fail immediately.
Having formed a connection, we attempt a login, and if the server does
not respond in <timeout> seconds, we then fail.

tds/login.c::tds_connect() doesn't work that way. If the connect_timeout
member of TDSCONNECTINFO is nonzero, it waits that number of seconds
trying to *form* the connection. That delay is pointless: a server that
doesn't respond to connect(3) immediately will never respond. We never
noticed this before because there was never a way to set connect_timeout;
it was always zero.

The function that should use connect_timeout is
tds/token.c::tds_process_login_tokens(). At the bottom of the stack, it's
actually tds_read_packet() that needs to be aware of the timeout
possibility; probably tds_process_login_tokens() should temporarily
override the socket's normal timeout value. Otherwise, tds_read_packet()
would have to know about special behavior during login.

Isn't it just like programming to open a can of worms the first day on the
job?

--jkl



  • [freetds] rerun autogen.sh, and login timeouts, James K. Lowden, 12/10/2002

Archive powered by MHonArc 2.6.24.

Top of Page