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

Dmitry Fleytman dmitry at daynix.com
Sun Aug 16 04:43:39 PDT 2015


> On Aug 11, 2015, at 15:22 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 
> 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.

Oops, fixed in v4.


> 
> Christophe



More information about the Spice-devel mailing list