From: Havoc Pennington Date: Thu, 14 Sep 2006 13:53:16 +0000 (+0000) Subject: 2006-09-14 Havoc Pennington X-Git-Tag: dbus-0.94~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e24dec0a89a5853cb448fb3037f2658f2b682650;p=thirdparty%2Fdbus.git 2006-09-14 Havoc Pennington * dbus/dbus-transport-unix.c (unix_do_iteration): fix a valgrind complaint about accessing revents when poll returns 0, from Julian Seward. --- diff --git a/ChangeLog b/ChangeLog index c194464e7..589e434e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-14 Havoc Pennington + + * 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 * Released 1.0 RC 1 (0.93) diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index b2f7faa36..5536e9239 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -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