[Spice-devel] [PATCH spice-gtk 5/6] usbredir: Add a spice_usb_device_manager_can_redirect_device function

Marc-André Lureau marcandre.lureau at gmail.com
Wed Feb 22 06:12:25 PST 2012


The patch looks fine in general.

You like to use a lot GError in general, which is a good thing. But we
didn't have so many error conditions reported until now. You shouldn't
be affraid to introduce and use different error codes. That would
allow the caller to do something smart about it (may sound silly, but
perhaps it could create new channel automatically, treat some errors
as critical or ignore others, or things like that)

On Tue, Feb 21, 2012 at 3:12 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> +    /* When we run the channel is still "in use", it only becomes free
> +       after we run, so we update our status in idle. */
> +    g_idle_add(spice_usb_device_widget_update_status, self);

I don't really understand the comment. Couldn't we set a flag saying
that update_status() should be called "after we run", when we reached
the condition, instead of just adding an untracked idle?

-- 
Marc-André Lureau


More information about the Spice-devel mailing list