<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 29 Jan 2016, at 14:40 PM, Dmitry Fleytman <<a href="mailto:dmitry@daynix.com" class="">dmitry@daynix.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">On 29 Jan 2016, at 24:42 AM, Jonathon Jongsma <<a href="mailto:jjongsma@redhat.com" class="">jjongsma@redhat.com</a>> wrote:<br class=""><br class="">On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote:<br class=""><blockquote type="cite" class="">Signed-off-by: Dmitry Fleytman <<a href="mailto:dmitry@daynix.com" class="">dmitry@daynix.com</a>><br class="">---<br class="">spice-common | 2 +-<br class="">src/usb-device-manager.c | 108 ++++++++++++++++++++++++++++------------------<br class="">-<br class="">2 files changed, 66 insertions(+), 44 deletions(-)<br class=""><br class="">diff --git a/spice-common b/spice-common<br class="">index f7ec855..2d054e0 160000<br class="">--- a/spice-common<br class="">+++ b/spice-common<br class="">@@ -1 +1 @@<br class="">-Subproject commit f7ec855af3deff18aeb43ddbf2467c565f4bf346<br class="">+Subproject commit 2d054e0e6901a1cfbe396f30d9899da46ff533d9<br class=""></blockquote><br class="">It looks like this submodule update can be removed.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Right, it should not be there.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Ditched.</div><div>Thanks!</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">In general I don't see a huge need to move these to separate functions, since<br class="">they're not used elsewhere. But OK.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">These functions needed to make next patches of the same series simpler.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Probably this should be stated in the commit message.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>I added an explanation to the commit message.</div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><blockquote type="cite" class="">diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c<br class="">index 4930613..78f038e 100644<br class="">--- a/src/usb-device-manager.c<br class="">+++ b/src/usb-device-manager.c<br class="">@@ -1396,6 +1396,68 @@ gboolean<br class="">spice_usb_device_manager_is_device_connected(SpiceUsbDeviceManager *sel<br class=""> return !!spice_usb_device_manager_get_channel_for_dev(self, device);<br class="">}<br class=""><br class="">+#if defined(USE_USBREDIR) && defined(G_OS_WIN32)<br class="">+<br class="">+static void<br class="">+_spice_usb_device_manager_install_driver_async(SpiceUsbDeviceManager *self,<br class="">+ SpiceUsbDevice *device,<br class="">+ GCancellable *cancellable,<br class="">+ GAsyncReadyCallback callback,<br class="">+ gpointer user_data)<br class="">+{<br class="">+ SpiceWinUsbDriver *installer;<br class="">+ UsbInstallCbInfo *cbinfo;<br class="">+<br class="">+ g_return_if_fail(self->priv->installer);<br class="">+<br class="">+ spice_usb_device_set_state(device, SPICE_USB_DEVICE_STATE_INSTALLING);<br class="">+<br class="">+ installer = self->priv->installer;<br class="">+ cbinfo = g_new0(UsbInstallCbInfo, 1);<br class="">+ cbinfo->manager = self;<br class="">+ cbinfo->device = spice_usb_device_ref(device);<br class="">+ cbinfo->installer = installer;<br class="">+ cbinfo->cancellable = cancellable;<br class="">+ cbinfo->callback = callback;<br class="">+ cbinfo->user_data = user_data;<br class="">+<br class="">+ spice_win_usb_driver_install_async(installer, device, cancellable,<br class="">+ <br class="">spice_usb_device_manager_drv_install_cb,<br class="">+ cbinfo);<br class="">+}<br class="">+<br class="">+static void<br class="">+_spice_usb_device_manager_uninstall_driver_async(SpiceUsbDeviceManager *self,<br class="">+ SpiceUsbDevice *device)<br class="">+{<br class="">+ SpiceWinUsbDriver *installer;<br class="">+ UsbInstallCbInfo *cbinfo;<br class="">+ guint8 state;<br class="">+<br class="">+ g_warn_if_fail(device != NULL);<br class="">+ g_return_if_fail(self->priv->installer);<br class="">+<br class="">+ state = spice_usb_device_get_state(device);<br class="">+ if ((state != SPICE_USB_DEVICE_STATE_INSTALLED) &&<br class="">+ (state != SPICE_USB_DEVICE_STATE_CONNECTED)) {<br class="">+ return;<br class="">+ }<br class="">+<br class="">+ spice_usb_device_set_state(device, SPICE_USB_DEVICE_STATE_UNINSTALLING);<br class="">+<br class="">+ installer = self->priv->installer;<br class="">+ cbinfo = g_new0(UsbInstallCbInfo, 1);<br class="">+ cbinfo->manager = self;<br class="">+ cbinfo->device = spice_usb_device_ref(device);<br class="">+ cbinfo->installer = installer;<br class="">+<br class="">+ spice_win_usb_driver_uninstall_async(installer, device, NULL,<br class="">+ <br class="">spice_usb_device_manager_drv_uninstall_cb,<br class="">+ cbinfo);<br class="">+}<br class="">+<br class="">+#endif<br class="">+<br class="">static void<br class="">_spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,<br class=""> SpiceUsbDevice *device,<br class="">@@ -1491,25 +1553,8 @@ void<br class="">spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,<br class="">{<br class=""><br class="">#if defined(USE_USBREDIR) && defined(G_OS_WIN32)<br class="">- SpiceWinUsbDriver *installer;<br class="">- UsbInstallCbInfo *cbinfo;<br class="">-<br class="">- g_return_if_fail(self->priv->installer);<br class="">-<br class="">- spice_usb_device_set_state(device, SPICE_USB_DEVICE_STATE_INSTALLING);<br class="">-<br class="">- installer = self->priv->installer;<br class="">- cbinfo = g_new0(UsbInstallCbInfo, 1);<br class="">- cbinfo->manager = self;<br class="">- cbinfo->device = spice_usb_device_ref(device);<br class="">- cbinfo->installer = installer;<br class="">- cbinfo->cancellable = cancellable;<br class="">- cbinfo->callback = callback;<br class="">- cbinfo->user_data = user_data;<br class="">-<br class="">- spice_win_usb_driver_install_async(installer, device, cancellable,<br class="">- <br class="">spice_usb_device_manager_drv_install_cb,<br class="">- cbinfo);<br class="">+ _spice_usb_device_manager_install_driver_async(self, device, cancellable,<br class="">+ callback, user_data);<br class="">#else<br class=""> _spice_usb_device_manager_connect_device_async(self,<br class=""> device,<br class="">@@ -1569,30 +1614,7 @@ void<br class="">spice_usb_device_manager_disconnect_device(SpiceUsbDeviceManager *self,<br class=""> spice_usbredir_channel_disconnect_device(channel);<br class=""><br class="">#ifdef G_OS_WIN32<br class="">- SpiceWinUsbDriver *installer;<br class="">- UsbInstallCbInfo *cbinfo;<br class="">- guint8 state;<br class="">-<br class="">- g_warn_if_fail(device != NULL);<br class="">- g_return_if_fail(self->priv->installer);<br class="">-<br class="">- state = spice_usb_device_get_state(device);<br class="">- if ((state != SPICE_USB_DEVICE_STATE_INSTALLED) &&<br class="">- (state != SPICE_USB_DEVICE_STATE_CONNECTED)) {<br class="">- return;<br class="">- }<br class="">-<br class="">- spice_usb_device_set_state(device, SPICE_USB_DEVICE_STATE_UNINSTALLING);<br class="">-<br class="">- installer = self->priv->installer;<br class="">- cbinfo = g_new0(UsbInstallCbInfo, 1);<br class="">- cbinfo->manager = self;<br class="">- cbinfo->device = spice_usb_device_ref(device);<br class="">- cbinfo->installer = installer;<br class="">-<br class="">- spice_win_usb_driver_uninstall_async(installer, device, NULL,<br class="">- <br class="">spice_usb_device_manager_drv_uninstall_cb,<br class="">- cbinfo);<br class="">+ _spice_usb_device_manager_uninstall_driver_async(self, device);<br class="">#endif<br class=""><br class="">#endif</blockquote></blockquote></div></blockquote></div><br class=""></body></html>