Re: [PATCH spice-gtk 06/14] win-usb: throw an error if reply.status != 0

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

 



I have no experience with usbclerk, but reading the code, it seems that reply.status is set to a boolean value[1], with true meaning success.  So the status!=0 below appears to be backward.  Or am I reading it wrong?

[1] http://cgit.freedesktop.org/spice/win32/usbclerk/tree/usbclerk.cpp#n396

----- Original Message -----
> From: "Marc-André Lureau" <marcandre.lureau@xxxxxxxxx>
> To: spice-devel@xxxxxxxxxxxxxxx
> Sent: Wednesday, April 23, 2014 1:09:11 PM
> Subject:  [PATCH spice-gtk 06/14] win-usb: throw an error if	reply.status != 0
> 
> ---
>  gtk/win-usb-driver-install.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c
> index c3a7ace..f28621f 100644
> --- a/gtk/win-usb-driver-install.c
> +++ b/gtk/win-usb-driver-install.c
> @@ -175,6 +175,15 @@ void win_usb_driver_handle_reply_cb(GObject *gobject,
>          goto failed_reply;
>      }
>  
> +    if (priv->reply.status != 0) {
> +        g_warning("usbclerk reply status %d", priv->reply.status);
> +        g_simple_async_result_set_error(priv->result,
> +                                        SPICE_WIN_USB_DRIVER_ERROR,
> +                                        SPICE_WIN_USB_DRIVER_ERROR_MESSAGE,
> +                                        "usbclerk message with error status
> %d", priv->reply.status);
> +        goto failed_reply;
> +    }
> +
>   failed_reply:
>      g_simple_async_result_complete_in_idle(priv->result);
>      g_clear_object(&priv->result);
> --
> 1.8.5.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]