Skip to Content.
Sympa Menu

freetds - Error/Cancel problem: What is tds_get_byte() doing?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: <lbayuk AT mindspring.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Error/Cancel problem: What is tds_get_byte() doing?
  • Date: Sat, 7 Sep 2002 20:36:41 -0400 (EDT)


I'm trying to work on this problem with PHP and cancel after error causing
loss of synch between server and client, and I come to this new code in
read.c/tds_get_byte() which I'm having trouble understanding:

while (tds->s && (rc = tds_read_packet(tds) == 0)) ;

Note that "rc = f() == 0" is the same as "rc = (f() == 0)", which makes
no sense since the next line tests if rc==-1.

Maybe it was supposed to be this:

while (tds->s && (rc = tds_read_packet(tds)) == 0) ;

This still does not fix the broken PHP error handling, but at least it
may be one more step in that direction.




Archive powered by MHonArc 2.6.24.

Top of Page