Skip to Content.
Sympa Menu

freetds - Re: [freetds] goodread... not so fine

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alex Kiesel <alex.kiesel AT document-root.de>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] goodread... not so fine
  • Date: Wed, 14 Jan 2004 13:37:06 +0100

On Wed, 2004-01-14 at 11:04, ZIGLIO, Frediano, VF-IT wrote:
> @ /* When we get a timeout on select(), return 0. Don't
> return -1, because
> @ * that would lead to a disconnect
> @ * OTOH, do not let this pass to prevent an infinite
> loop when there is
> @ * no data on the wire */
> @ if (retcode == 0)
> @ return 0;
> @
>
> This is quite bad. If we are not able to read data in 1 second we just
> return 0 (while from documentation we should never return 0). Also
> probably caller disconnect detecting a error (see tds_read_packet) so
> this code do not solve the problem... also returning 0 we discard
> already readed data (got bytes) and we lose syncro with server.

Yes, I agree with you. These two lines should be removed again. What I
wanted to achieve here, is to prevent an endless loop when all data from
the server has been read from wire - but tds tries to read more.

These lines don't fix the bug, but workaround it - but at the cost of
creating other bugs... So, it should be corrected.

Cheers,
-Alex




Archive powered by MHonArc 2.6.24.

Top of Page