freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- 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
-
[freetds] old patch,
ZIGLIO, Frediano, VF-IT, 07/10/2006
- <Possible follow-up(s)>
- Re: [freetds] old patch, Lowden, James K, 07/10/2006
-
Re: [freetds] old patch,
ZIGLIO, Frediano, VF-IT, 07/11/2006
- Re: [freetds] old patch, James K. Lowden, 07/11/2006
- Re: [freetds] old patch, ZIGLIO, Frediano, VF-IT, 07/11/2006
Archive powered by MHonArc 2.6.24.