2006-11-18 Jelle Hissink <Jelle.Hissink@C-it.nl>
authorMiguel de Icaza <miguel@gnome.org>
Sat, 18 Nov 2006 16:33:52 +0000 (16:33 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 18 Nov 2006 16:33:52 +0000 (16:33 -0000)
* serial.c (poll_serial): Add timeout parameter to poll.

Fixes #79722 and #79735

svn path=/trunk/mono/; revision=68123

support/ChangeLog
support/serial.c

index 106dc9274432c25669da007e252ddab5659527c7..1eddf6e89200c3daa1fe2d9a3c4c6b05cf418bf3 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-18  Jelle Hissink  <Jelle.Hissink@C-it.nl>
+
+       * serial.c (poll_serial): Add timeout parameter to poll.
+
+       Fixes #79722 and #79735
+
 2006-11-17  Jonathan Pryor  <jonpryor@vt.edu>
 
        * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
index c0d2dbdae9fab589a295a44bd69b2f93b30f7a4f..69f3a76cceceda108fbd7df1d3283381639051fc 100644 (file)
@@ -322,7 +322,7 @@ set_signal (int fd, MonoSerialSignal signal, gboolean value)
 }
 
 gboolean
-poll_serial (int fd, gint32 *error)
+poll_serial (int fd, gint32 *error, int timeout)
 {
        struct pollfd pinfo;
        
@@ -332,7 +332,7 @@ poll_serial (int fd, gint32 *error)
        pinfo.events = POLLIN;
        pinfo.revents = 0;
 
-       if (poll (&pinfo, 1, 0) == -1) {
+       if (poll (&pinfo, 1, timeout) == -1) {
                *error = -1;
                return FALSE;
        }