Hi,

On 02/22/2012 03:12 PM, Marc-André Lureau wrote:
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)

Understood. I'll look into doing a follow up patch introducing various
error codes for different USB error conditions.


On Tue, Feb 21, 2012 at 3:12 PM, Hans de Goede<[email protected]>  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?

Since I was touching the device-error signal emit code anyways I've changed
it to first set channel->device to NULL (through calling device_disconnect())
and only then ask the usb device manager to emit the signal, removing the
need to do this in idle. And I've changed this to a direct call in my local
tree.

Regards,

Hans
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to