Skip to Content.
Sympa Menu

freetds - Re: [freetds] dblib problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Frank M. Kromann" <frank AT kromann.info>
  • To: "James K. Lowden" <jklowden AT schemamania.org>
  • Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dblib problems
  • Date: Mon, 14 Jul 2003 10:55:15 -0700

Hi James,

SO_LINGER and SO_KEEPALIVE are both defined in winsock.h and are bot
visible to the preprocessor.
The changes from 1.95 to 1.96 does not seam to have anything to do with
the connect() function and reverting the changes from 1.96 to 1.97 does
not have any effetc.

The problems with connect() seams to be connected to the setting of
nonblocking mode. If I change line 311 to

ioctl_blocking = 0; /* ~0; //TRUE; */

I'm able to connect. Then it is on to the next problem - connection dead
:-)

10:47:54 Connecting to 127.0.0.1 port 1433, TDS 7.0.
10:47:54 tds_put_string converting 6 bytes of "obelix"
10:47:54 tds_put_string wrote 12 bytes
10:47:54 tds_put_string converting 6 bytes of "myuser"
10:47:54 tds_put_string wrote 12 bytes
10:47:54 tds_put_string converting 7 bytes of "PHP 4.0"
10:47:54 tds_put_string wrote 14 bytes
10:47:54 tds_put_string converting 7 bytes of "myalias"
10:47:54 tds_put_string wrote 14 bytes
10:47:54 tds_put_string converting 10 bytes of "DB-Library"
10:47:54 tds_put_string wrote 20 bytes
10:47:54 tds_put_string converting 10 bytes of "us_english"
10:47:54 tds_put_string wrote 20 bytes
10:47:54 tds_put_string wrote 0 bytes
10:47:54 tds_process_login_tokens()
10:47:54 looking for login token, got 0()
10:47:54 tds_process_default_tokens() marker is 0()
10:47:54 leaving tds_process_default_tokens() connection dead

- Frank

P.S cvs.sourceforge.net is not easy to work with. It takes 5-10 tryes to
update or diff. Is the server just overloaded ?

> On Fri, 11 Jul 2003 17:08:32 -0700, "Frank M. Kromann"
> <frank AT kromann.info> wrote:
> > I have compiled dblib on Win32, and changed the mssql extension for
PHP
> > to use this library. Everything compiles links and loads fine, but
when
> > I try to connect I get this error:
> >
> > src/tds/login.c: tds_connect (timed): Invalid argument
>
> Hi Frank,
>
> I don't know what led us to use perror(3) there instead of
tds_dump()....
>
> The error means that connect(2) was passed something invalid. Timeout
> handling was changed recently; I wonder if there's a missing/wrong
defined
> constant being used to set up struct sockaddr under Win32? There's not
> enough information in the log to know. Does your preprocessor see
> SO_LINGER and/or SO_KEEPALIVE ? Does the same thing happen if you undo
> the changes from 1.96 to 1.97 of login.c? We don't check the return
codes
> for the ioctl() calls; perhaps one of them is going awry silently.
>
> I don't think my iconv work could affect this....
>
> I don't see that you're "missing" anything. Clearly under Win32 the
error
> message could be better (what's new?). The trick lies in finding out
> what's making connect() unhappy. Please try making the error checking
> more pedantic and see if that flushes anything out. Let me know if
> there's something you think I should/could do.
>
> Regards,
>
> --jkl
>







Archive powered by MHonArc 2.6.24.

Top of Page