2000-09-15 Fernando Nasser <fnasser@cygnus.com>
authorFernando Nasser <fnasser@redhat.com>
Fri, 15 Sep 2000 20:40:15 +0000 (20:40 +0000)
committerFernando Nasser <fnasser@redhat.com>
Fri, 15 Sep 2000 20:40:15 +0000 (20:40 +0000)
* ser-unix.c (do_unix_readchar): Prevent infinite read wait to be
interrupted after 32K seconds.

gdb/ChangeLog
gdb/ser-unix.c

index 3ce502690db84b1e84ed0562da786e941584d7b2..82bde3efb7bb75225fe8b03b8701725a88348d1f 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-15  Fernando Nasser  <fnasser@cygnus.com>
+
+       * ser-unix.c (do_unix_readchar): Prevent infinite read wait to be
+       interrupted after 32K seconds.
+
 2000-09-15  Kevin Buettner  <kevinb@redhat.com>
 
        * language.c (show_case_command, set_case_command): Protoize.
index 5a1ec1dc14f0d02f95fee8648d60c70dbfc9e67a..73555b27a0a6e0fe7b1651f423be5753d2c55604 100644 (file)
@@ -927,7 +927,7 @@ do_unix_readchar (serial_t scb, int timeout)
        }
 
       status = ser_unix_wait_for (scb, delta);
-      timeout -= 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. */
This page took 0.031174 seconds and 4 git commands to generate.