Skip to Content.
Sympa Menu

freetds - Re: [freetds] old patch

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] old patch
  • Date: Tue, 11 Jul 2006 17:34:20 +0200

> >
> > About patch
> >
> http://freetds.cvs.sourceforge.net/freetds/freetds/src/tds/tok
> en.c?r1=1.
> > 313&r2=1.314&sortby=date
> > these lines
> >
> > if( marker == TDS_FAIL ) {
> > tdsdump_log(TDS_DBG_FUNC, "error: tds_process_param_result()
> > returned TDS_FAIL\n");
> > return TDS_FAIL;
> > }
> >
> > seem a bit odd.. tds_get_byte does not return TDS_FAIL and also you
> > should close connection if you detect an problem in server data (but
> > perhaps tds_get_byte returns invalid only if connection was broken).
>
> You're quite right. But I'm only as confused as the code is.
>
> I was trying to catch the return from
> tds_process_param_result(), which
> can be a token *or* TDS_FAIL. But of course the logic:
>
> while ((marker = tds_get_byte(tds)) == TDS_PARAM_TOKEN) {
> tds_process_param_result(tds, pinfo);
> }
>
> ignores the return code and discards the token. I'm
> surprised it works.
> :-/
>

Well... is not that it returns token, is that token variable is reused
to store a TDS_FAIL/TDS_SUCCEED... just rename token in
tds_process_param_result to rc :) However result is not used...

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page