freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Issue connecting to SQL Server fromLinuxHostwithnewerversions of FreeTDS...
- From: "Lowden, James K" <james.k.lowden AT alliancebernstein.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Issue connecting to SQL Server fromLinuxHostwithnewerversions of FreeTDS...
- Date: Tue, 28 Nov 2006 13:40:30 -0500
> From: Glenn, Chris
> Sent: Tuesday, November 28, 2006 10:20 AM
> > From: Lowden, James K Sent: Tuesday, November 28, 2006 10:02 AM
> >
> > > From: Christos Zoulas Sent: Tuesday, November 28, 2006 9:02 AM
> > >
> > > On Nov 28, 8:10am, Glenn AT addsys.com ("Glenn, Chris") wrote:
> > > -- Subject: Re: [freetds] Issue connecting to SQL Server from
> > > Linux Host with
> > >
> > > | The code itself looks OK, and comparing it to revision 1.14
> > > | (Tue Feb 22 16:04:36 2005), most of the changes are to the
> > > | logging code and adding support for DOS32. That makes me
> > > | wonder if it's a matter of configure perhaps misdetecting
> > > | your system somehow. I think it was around that time that
> > > | we upgraded the toolset that generates the configure script.
> > >
> > > The code is broken (if I am looking at the right version). All
> > > the fields of sockaddr_in are required to be initialized to 0.
> > > Try adding a:
> > >
> > > (void)memset(&sin, 0, sizeof(sin));
> > >
> > > at the beginning of the function.
> >
> > This is why it's good to have someone like Christos active on
> > the list.
> >
> >
> > Try the below patch, and cross your fingers.
>
> Unfortunately I still get the same error messages with this patch?
That's disappointing. This won't be easy.
I just re-wrote (re-arranged, mostly) src/tds/net.c::tds_open_socket()
so IMHO it's a little saner. It will be in tomorrow's snapshot.
I suggest you try it, but I don't expect anything different. If it
still doesn't work, we can try some triangulation. The question is: is
the problem actually with this function, with connect(2) and select(2),
or are you seeing a side effect of something else?
I suggest:
1. Try tomorrow's snapshot, just in case.
2. Get src/tds/net.c revision 1.14 from CVS (or use your February
snapshot). Copy its tds_open_socket() function entirely, and paste it
into the current snapshot's, overwriting the current implementation.
Rebuild. Does the problem go away?
If replacing tds_open_socket() with the 1.14 revision's works, we know
the function is broken for you. If not, trying to fix the function
would be barking up the wrong tree.
That at least will give us more information, even if it doesn't solve
anything.
[Re your last message: I think you have one too many memset() calls.
You're trying to connect to port 0, which will never work.]
HTH.
--jkl
-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.
- Re: [freetds] Issue connecting to SQL Server fromLinuxHostwithnewerversions of FreeTDS..., Lowden, James K, 11/28/2006
Archive powered by MHonArc 2.6.24.