[Spice-devel] [PATCH v4 09/16] UsbDeviceManager: Move more redirection specific logic under corresponding ifdef

Dmitry Fleytman dmitry at daynix.com
Thu Oct 29 07:53:29 PDT 2015


> On 22 Sep 2015, at 19:14 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 
> What's happening if we don't do that ? warnings ? broken compilation ?

Compilation problem with USB redirection disabled.
This patch fixed an issue which was introduced by UsbDk backend series, I fixed that issue in corresponding patch and will resend both series soon.

> 
> On Sun, Aug 16, 2015 at 03:35:46PM +0300, Dmitry Fleytman wrote:
>> From: Kirill Moizik <kmoizik at redhat.com>
>> 
>> Signed-off-by: Kirill Moizik <kmoizik at redhat.com>
>> Signed-off-by: Dmitry Fleytman <dfleytma at redhat.com>
>> ---
>> src/usb-device-manager.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>> 
>> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
>> index f133907..71b2433 100644
>> --- a/src/usb-device-manager.c
>> +++ b/src/usb-device-manager.c
>> @@ -1484,6 +1484,7 @@ gboolean spice_usb_device_manager_is_device_connected(SpiceUsbDeviceManager *sel
>>     return !!spice_usb_device_manager_get_channel_for_dev(self, device);
>> }
>> 
>> +#ifdef USE_USBREDIR
>> /**
>>  * spice_usb_device_manager_connect_device_async:
>>  * @manager: the #SpiceUsbDeviceManager manager
>> @@ -1509,7 +1510,6 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>>     result = g_simple_async_result_new(G_OBJECT(self), callback, user_data,
>>                                spice_usb_device_manager_connect_device_async);
>> 
>> -#ifdef USE_USBREDIR
>>     SpiceUsbDeviceManagerPrivate *priv = self->priv;
>>     libusb_device *libdev;
>>     guint i;
>> @@ -1555,18 +1555,16 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>>         libusb_unref_device(libdev);
>>         return;
>>     }
>> -#endif
>> 
>>     g_simple_async_result_set_error(result,
>>                             SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
>>                             _("No free USB channel"));
>> -#ifdef USE_USBREDIR
>> done:
>> -#endif
>>     g_simple_async_result_complete_in_idle(result);
>>     g_object_unref(result);
>> }
>> 
>> +#endif
>> 
>> void spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>>                                              SpiceUsbDevice *device,
>> -- 
>> 2.4.3
>> 
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list