On Wed, Dec 14, 2016 at 12:07:55PM +0100, Hans de Goede wrote: > Hi, > > On 14-12-16 11:51, Christophe Fergeau wrote: > > In newer X.org versions, it's no longer supported to modify the set of > > FDs passed to a BlockHandler method to get notified when the FD has data > > to be read. This was limited anyway as we could only get read events > > this way, and had to do our own polling to get notified about socket > > writeability. > > > > Starting from xserver 1.19, the supported way of doing this is to use > > the SetNotifyFd/RemoveNotifyFd API, which is actually a much better way > > as it matches very well the 'watch' API spice-server expects Xspice to > > implement. > > > > This commit switches to that new API, which removes the need for > > RegisterBlockAndWakeupHandlers(). > > Thank you for doing this, one small comment inline, otherwise looks > good: > > Reviewed-by: Hans de Goede <[email protected]>
I had a small unapplied change in my working copy,
s/watch_update_mask2/watch_update_mask_internal/ which I squashed in.
> > +static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func,
> > void *opaque)
> > +{
> > + SpiceWatch *watch = malloc(sizeof(SpiceWatch));
>
> This malloc may fail, please replace malloc with
> xnfalloc which stands for X no fail alloc, it works like
> the glib malloc functions.
There are several other occurrences of unchecked malloc in the Xspice
code, as well as a few strdup calls. I'll change these in a follow-up
patch.
Christophe
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
