Re: [qxl] xspice: Adjust to X.org 1.19 changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hdegoede@xxxxxxxxxx>

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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]