Skip to Content.
Sympa Menu

freetds - Re: [PATCH] goodread() fix *re-submitted*

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Steve Willer <willer AT novator.com>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: [PATCH] goodread() fix *re-submitted*
  • Date: Tue, 19 Mar 2002 15:26:30 -0500 (EST)



On Thu, 14 Mar 2002, Steve Willer wrote:

> while (got < buflen) {
> int thisgot;
> thisgot = READ(tds->s, buf + got, buflen - got);
> if (thisgot <= 0) break;
> got += thisgot;
> }

In this patch, shouldn't the line:

if (thisgot <= 0) break;

actually be:

if (thisgot <= 0) return -1;

?

This seems more correct, because tds_read_packet() expects a -1 in an
error situation. I think we're actually experiencing the inf-loops caused
by this bug in error handling (we're using the patch locally).





Archive powered by MHonArc 2.6.24.

Top of Page