This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: Patch to ser-unix.c (When infinite equals 32K seconds)
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: RFA: Patch to ser-unix.c (When infinite equals 32K seconds)
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Tue, 12 Sep 2000 17:43:31 -0400
- Organization: Red Hat , Inc. - Toronto
This patch prevents the infinite read block to terminate after 32K seconds...
2000-09-12 Fernando Nasser <fnasser@cygnus.com>
* ser-unix.c (do_unix_readchar): Prevent infinite read wait to be
interrupted after 32K seconds.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299
Index: ser-unix.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-unix.c,v
retrieving revision 1.5
diff -c -p -r1.5 ser-unix.c
*** ser-unix.c 2000/07/30 01:48:27 1.5
--- ser-unix.c 2000/09/12 15:57:11
*************** do_unix_readchar (serial_t scb, int time
*** 927,933 ****
}
status = ser_unix_wait_for (scb, delta);
! timeout -= delta;
/* If we got a character or an error back from wait_for, then we can
break from the loop before the timeout is completed. */
--- 927,933 ----
}
status = ser_unix_wait_for (scb, delta);
! timeout = (timeout <= 0) ? timeout : (timeout - delta);
/* If we got a character or an error back from wait_for, then we can
break from the loop before the timeout is completed. */