[Spice-commits] 2 commits - src/channel-usbredir.c src/usb-device-manager.c

Pavel Grunt pgrunt at kemper.freedesktop.org
Tue Mar 22 10:37:57 UTC 2016


 src/channel-usbredir.c   |   14 +++++++-------
 src/usb-device-manager.c |    2 --
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit ae8f97eb5a1a735dfeca688c437729ba47a379f1
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Mar 21 13:51:08 2016 +0100

    usb-device-manager: Remove invalid return annotation
    
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 417c5b2..85231a1 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -1568,8 +1568,6 @@ gboolean spice_usb_device_manager_connect_device_finish(
  * @device: a #SpiceUsbDevice to disconnect
  *
  * Disconnects the @device.
- *
- * Returns: %TRUE if @device has an associated USB redirection channel
  */
 void spice_usb_device_manager_disconnect_device(SpiceUsbDeviceManager *self,
                                                 SpiceUsbDevice *device)
commit d56e64dc301772dddf9bff992b04fcf1e9ce6bdb
Author: snir sheriber <ssheribe at redhat.com>
Date:   Sun Mar 20 15:03:41 2016 +0200

    usbredir_handle_msg: rename data to err_data
    
    To better reflect what this variable is used for and change the declare
    location such that it will be declared only if it should
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index dc96d09..ab90800 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -629,7 +629,6 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
 {
     SpiceUsbredirChannel *channel = SPICE_USBREDIR_CHANNEL(c);
     SpiceUsbredirChannelPrivate *priv = channel->priv;
-    device_error_data data;
     int r, size;
     uint8_t *buf;
 
@@ -645,6 +644,7 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
     r = usbredirhost_read_guest_data(priv->host);
     if (r != 0) {
         SpiceUsbDevice *spice_device = priv->spice_device;
+        device_error_data err_data;
         gchar *desc;
         GError *err;
 
@@ -674,14 +674,14 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
 
         CHANNEL_DEBUG(c, "%s", err->message);
 
-        data.channel = channel;
-        data.caller = coroutine_self();
-        data.spice_device = g_boxed_copy(spice_usb_device_get_type(), spice_device);
-        data.error = err;
-        g_idle_add(device_error, &data);
+        err_data.channel = channel;
+        err_data.caller = coroutine_self();
+        err_data.spice_device = g_boxed_copy(spice_usb_device_get_type(), spice_device);
+        err_data.error = err;
+        g_idle_add(device_error, &err_data);
         coroutine_yield(NULL);
 
-        g_boxed_free(spice_usb_device_get_type(), data.spice_device);
+        g_boxed_free(spice_usb_device_get_type(), err_data.spice_device);
 
         g_error_free(err);
     }


More information about the Spice-commits mailing list