dbus/dbus dbus-transport-unix.c,1.50,1.51

Havoc Pennington hp at kemper.freedesktop.org
Thu Sep 14 06:53:18 PDT 2006


Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv26823/dbus

Modified Files:
	dbus-transport-unix.c 
Log Message:
2006-09-14  Havoc Pennington  <hp at redhat.com>

	* dbus/dbus-transport-unix.c (unix_do_iteration): fix a valgrind
	complaint about accessing revents when poll returns 0, from Julian Seward.



Index: dbus-transport-unix.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-transport-unix.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- dbus-transport-unix.c	14 Aug 2006 19:11:35 -0000	1.50
+++ dbus-transport-unix.c	14 Sep 2006 13:53:16 -0000	1.51
@@ -1031,6 +1031,12 @@
       
       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



More information about the dbus-commit mailing list