Skip to Content.
Sympa Menu

freetds - Re: [freetds] old patch

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] old patch
  • Date: Tue, 11 Jul 2006 08:25:31 -0400

ZIGLIO, Frediano, VF-IT wrote:
>
> About patch
> http://freetds.cvs.sourceforge.net/freetds/freetds/src/tds/token.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.
:-/

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page