[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]

 



---
 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




[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]