Skip to Content.
Sympa Menu

freetds - Re: current CVS version won't connect to MSSQL 7

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: current CVS version won't connect to MSSQL 7
  • Date: Fri, 18 Feb 2000 18:34:50 -0500 (EST)



As far as I can tell the TDS 7 login packet assumes that the client is
little endian. However, if you look at the login packet there is a bunch
of calls to tds_put_smallint() which writes the bytes in host order
(assuming the byte order was already negotiated). In tds_put_smallint you
could do something like:

tds_put_smallint(TDSSOCKET *tds, TDS_SMALL_INT si)
{
#ifdef HW_BIG_ENDIAN
if (IS_TDS70(tds)) {
tds_put_byte(tds, si / 256);
tds_put_byte(tds, si % 256);
} else {
tds_put_n(tds,(unsigned char *)&si,sizeof(TDS_SMALLINT));
}
#else
tds_put_n(tds,(unsigned char *)&si,sizeof(TDS_SMALLINT));
#endif
}

However, I'm guessing this is just the start of the troubles. A big
endian 7.0 client must be able to send and recieve *everything* in little
endian order...Perhaps I'm wrong and there is a switch to allow big end
client, but seeing as how there are no big endian TDS7 clients it'd
probably be bug ridden for lack of testing if it did exist.

Brian


On 18 Feb 2000, William P. McGonigle wrote:

>
>
> I tried sqsh today and get the same connection_dead in
> ct_process_default_tokens() to MSSQL 7 from Solaris 7, with TDS version 7.
> (jackpot)
>
>
> SWAG: Might the magic strings in tds7_send_login need to be ifdef'd for
> endianness like they are in tds_send_login?
>
>
> Thanks,
>
> -Bill
>





Archive powered by MHonArc 2.6.24.

Top of Page