Skip to Content.
Sympa Menu

freetds - RE: [freetds] Latest snapshot

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Latest snapshot
  • Date: Wed, 16 Apr 2003 12:47:12 -0400

> From: Thompson, Bill D (London) [mailto:ThompBil AT exchange.uk.ml.com]
> Sent: April 16, 2003 11:13 AM
>
> On the tds_put-string loop, I was only trying to send a 9
> character string
> (the hostname token in the login packet)...

Why would you want to do that? ;-)

Fixed, approximately. The problem was len was being multiplied by two, but
it represents the input size, so there's no reason to do that. So, you were
trying to send 18 bytes of a 9-byte buffer. Probably, tds_iconv detected an
illegal sequence between bytes 10..18, and refused to decrement len.

We should emit an error message in that event, but instead we just return,
and tds_put_string() should inspect errno, but it doesn't. Also,
tds_put_string() returns an unpredictable value: sometimes zero, sometimes
the number of bytes it last sent to tds_put_n().

I'm not sure what the error handling should look like, but there's clear
room for improvement. :/

--jkl


>
> BTW, I think I've cracked the results processing without
> hurting the basic
> infrastructure too much.
> All I've had to do is devolve the success or failure
> determination from
> tds_process_result_tokens back to the calling API by means of an extra
> parameter to that function.
> On the done tokens I also need to send back the type of the done token
> processed.
> That allows ctlib visiblity of everything it needs to make the correct
> decisions. I can also get rid of most of the nasty code/flags from
> ct_results and institute a better "state driven" code style...
>
> Bill
>
> > -----Original Message-----
> > From: Lowden, James K [SMTP:LowdenJK AT bernstein.com]
> > Sent: 16 April 2003 16:06
> > To: 'FreeTDS Development Group'
> > Subject: RE: [freetds] Latest snapshot
> >
> > > From: Thompson, Bill D (London)
> [mailto:ThompBil AT exchange.uk.ml.com]
> > > Sent: April 16, 2003 8:38 AM
> > >
> > > 1) I use a good old fashioned C compiler which has served me
> > > well for many
> > > years, so it objected to the C++ style comments (in tds.h and
> > > src/server/login.c)
> >
> > "///" at the left margin is an old habit of mine; it's my
> way of marking
> > the
> > line for deletion. I guess I'll have to find another way.
> >
> > If thine lines offend thee, pluck them out.
> >
> > > 2) from Solaris to MS SQL 2000, the code goes into an
> endless loop in
> > > tds_put_string()
> > > ...I guess "len" never gets decremented to 0
> >
> > Definitely broken if len > 256. Let me try again.
> >
> > Thanks for the report, Bill.
> >
> > --jkl
> >
> >
> > The information contained in this transmission may contain
> privileged and
> > confidential information 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 e-mail 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.
> >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>


The information contained in this transmission may contain privileged and
confidential information 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 e-mail 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.





Archive powered by MHonArc 2.6.24.

Top of Page