[Spice-devel] [PATCH spice-gtk 2/2] usb: stop processing usb events on error

Fabiano Fidêncio fabiano at fidencio.org
Fri Nov 7 17:17:27 PST 2014


On Fri, Nov 7, 2014 at 8:41 PM, Marc-André Lureau
<marcandre.lureau at redhat.com> wrote:
> If libusb returned an error in the event loop, stop further event
> handling. This avoid spinning in an error loop in error cases.
> ---
>  gtk/usb-device-manager.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
> index 5013b6c..61daa17 100644
> --- a/gtk/usb-device-manager.c
> +++ b/gtk/usb-device-manager.c
> @@ -1150,6 +1150,7 @@ static gpointer spice_usb_device_manager_usb_ev_thread(gpointer user_data)
>          if (rc && rc != LIBUSB_ERROR_INTERRUPTED) {
>              const char *desc = spice_usbutil_libusb_strerror(rc);
>              g_warning("Error handling USB events: %s [%i]", desc, rc);
> +            break;
>          }
>      }
>
> --
> 1.9.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


ACK!
-- 
Fabiano Fidêncio


More information about the Spice-devel mailing list