2006-09-14 Havoc Pennington <hp@redhat.com>
authorHavoc Pennington <hp@redhat.com>
Thu, 14 Sep 2006 13:53:16 +0000 (13:53 +0000)
committerHavoc Pennington <hp@redhat.com>
Thu, 14 Sep 2006 13:53:16 +0000 (13:53 +0000)
* dbus/dbus-transport-unix.c (unix_do_iteration): fix a valgrind
complaint about accessing revents when poll returns 0, from Julian Seward.

ChangeLog
dbus/dbus-transport-unix.c

index c194464e7e1a706350cefa2bbce634bf3feb0339..589e434e5fcd7927788d71ac83951e4545626272 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-14  Havoc Pennington  <hp@redhat.com>
+
+       * dbus/dbus-transport-unix.c (unix_do_iteration): fix a valgrind
+       complaint about accessing revents when poll returns 0, from Julian Seward.
+
 2006-09-14  John (J5) Palmieri  <johnp@redhat.com>
 
        * Released 1.0 RC 1 (0.93) 
index b2f7faa3627169fecc50ae9534dd5a18065982ea..5536e92390c2704515409698a17f493d3fa19328 100644 (file)
@@ -1031,6 +1031,12 @@ unix_do_iteration (DBusTransport *transport,
       
       if (poll_res >= 0)
         {
+          if (poll_res == 0)
+            poll_fd.revents = 0; /* some concern that posix does not guarantee this;
+                                  * valgrind flags it as an error. though it probably
+                                  * is guaranteed on linux at least.
+                                  */
+          
           if (poll_fd.revents & _DBUS_POLLERR)
             do_io_error (transport);
           else