Bug in _dbus_poll() without HAVE_POLL?

Havoc Pennington hp@redhat.com
Thu Jan 20 19:46:33 PST 2005


Hi,

In applying this I noticed that the same bug appears *after* the call to
select() - maybe that explains the problems you were seeing?

Havoc

On Tue, 2005-01-18 at 14:18 +0000, Tor Lillqvist wrote:
> 
> Index: dbus-sysdeps.c
> ===================================================================
> RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v
> retrieving revision 1.88
> diff -p -u -2 -r1.88 dbus-sysdeps.c
> --- dbus-sysdeps.c      17 Jan 2005 03:53:40 -0000      1.88
> +++ dbus-sysdeps.c      18 Jan 2005 13:34:35 -0000
> @@ -1863,16 +1863,16 @@ _dbus_poll (DBusPollFD *fds,
>        for (i = 0; i < n_fds; i++)
>         {
> -         DBusPollFD f = fds[i];
> +         DBusPollFD *fdp = fds + i;
> 
> -         f.revents = 0;
> +         fdp->revents = 0;
> 
> -         if (FD_ISSET (f.fd, &read_set))
> -           f.revents |= _DBUS_POLLIN;
> +         if (FD_ISSET (fdp->fd, &read_set))
> +           fdp->revents |= _DBUS_POLLIN;
> 
> -         if (FD_ISSET (f.fd, &write_set))
> -           f.revents |= _DBUS_POLLOUT;
> +         if (FD_ISSET (fdp->fd, &write_set))
> +           fdp->revents |= _DBUS_POLLOUT;
> 
> -         if (FD_ISSET (f.fd, &err_set))
> -           f.revents |= _DBUS_POLLERR;
> +         if (FD_ISSET (fdp->fd, &err_set))
> +           fdp->revents |= _DBUS_POLLERR;
>         }
>      }
> 
> 



More information about the dbus mailing list