[spice-gtk,v4,07/29] fixup! usb-redir: extend USB backend to support emulated devices

Submitted by Frediano Ziglio on Aug. 27, 2019, 9:22 a.m.

Details

Message ID 20190827092246.10276-8-fziglio@redhat.com
State Superseded
Headers show
Series "added feature of sharing CD image" ( rev: 6 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Aug. 27, 2019, 9:22 a.m.
Rename wait_disc_ack, confusing "disc"
---
 src/usb-backend.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/usb-backend.c b/src/usb-backend.c
index 9369bf5e..13d24d52 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -94,7 +94,7 @@  struct _SpiceUsbBackendChannel
     uint32_t hello_done_parser : 1;
     uint32_t hello_sent        : 1;
     uint32_t rejected          : 1;
-    uint32_t wait_disc_ack     : 1;
+    uint32_t wait_disconnect_ack : 1;
     SpiceUsbBackendDevice *attached;
     SpiceUsbredirChannel  *user_data;
     SpiceUsbBackend *backend;
@@ -1004,12 +1004,12 @@  static void usbredir_device_disconnect_ack(void *priv)
 {
     SpiceUsbBackendChannel *ch = priv;
     SPICE_DEBUG("%s ch %p", __FUNCTION__, ch);
-    if (ch->parser && ch->wait_disc_ack) {
+    if (ch->parser && ch->wait_disconnect_ack) {
         ch->parser = NULL;
         SPICE_DEBUG("%s switch to usbredirhost", __FUNCTION__);
         ch->usbredirhost = ch->hidden_host;
     }
-    ch->wait_disc_ack = 0;
+    ch->wait_disconnect_ack = 0;
 }
 
 static void usbredir_hello(void *priv,
@@ -1193,7 +1193,7 @@  static gboolean attach_edev(SpiceUsbBackendChannel *ch,
         ch->usbredirhost = NULL;
         ch->parser = ch->hidden_parser;
     }
-    ch->wait_disc_ack = 0;
+    ch->wait_disconnect_ack = 0;
     ch->attached = dev;
     dev->attached_to = ch;
     device_ops(dev->edev)->attach(dev->edev, ch->hidden_parser);
@@ -1269,9 +1269,9 @@  void spice_usb_backend_channel_detach(SpiceUsbBackendChannel *ch)
         }
         usbredirparser_send_device_disconnect(ch->parser);
         usbredir_write_flush_callback(ch);
-        ch->wait_disc_ack = usbredirparser_peer_has_cap(ch->parser,
-                                                        usb_redir_cap_device_disconnect_ack);
-        if (!ch->wait_disc_ack) {
+        ch->wait_disconnect_ack =
+            usbredirparser_peer_has_cap(ch->parser, usb_redir_cap_device_disconnect_ack);
+        if (!ch->wait_disconnect_ack) {
             ch->usbredirhost = ch->hidden_host;
             ch->parser = NULL;
         }

Comments