[Spice-devel] [PATCH v3 06/13] Usbredir Channel: Change disconnect signature to reuse in async context

Christophe Fergeau cfergeau at redhat.com
Tue Aug 11 05:22:54 PDT 2015


Hey,

Not clear at all why this is needed, even when looking at the code in
its final state (after all patches are applied).

On Mon, Aug 03, 2015 at 04:10:46PM +0300, Kirill Moizik wrote:
> From: Kirill Moizik <kmoizik at redhat.com>
> 
> ---
>  src/channel-usbredir-priv.h |  4 +++-
>  src/channel-usbredir.c      | 10 ++++++----
>  src/usb-device-manager.c    |  2 +-
>  3 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/src/channel-usbredir-priv.h b/src/channel-usbredir-priv.h
> index c987474..f2e17e3 100644
> --- a/src/channel-usbredir-priv.h
> +++ b/src/channel-usbredir-priv.h
> @@ -47,7 +47,9 @@ gboolean spice_usbredir_channel_connect_device_finish(
>                                          GAsyncResult         *res,
>                                          GError              **err);
>  
> -void spice_usbredir_channel_disconnect_device(SpiceUsbredirChannel *channel);
> +void spice_usbredir_channel_disconnect_device(GSimpleAsyncResult *simple,
> +                                              GObject *object,
> +                                              GCancellable *cancellable);
>  
>  libusb_device *spice_usbredir_channel_get_device(SpiceUsbredirChannel *channel);
>  
> diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
> index 7394b81..f1bd815 100644
> --- a/src/channel-usbredir.c
> +++ b/src/channel-usbredir.c
> @@ -121,7 +121,7 @@ static void spice_usbredir_channel_reset(SpiceChannel *c, gboolean migrating)
>  
>      if (priv->host) {
>          if (priv->state == STATE_CONNECTED)
> -            spice_usbredir_channel_disconnect_device(channel);
> +            spice_usbredir_channel_disconnect_device_async(channel, result, NULL);

This breaks compilation as this is only defined in the next commit.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150811/d30a7a0f/attachment.sig>


More information about the Spice-devel mailing list