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

Victor Toso victortoso at redhat.com
Tue Aug 27 10:02:49 UTC 2019


On Tue, Aug 27, 2019 at 10:22:24AM +0100, Frediano Ziglio wrote:
> Rename wait_disc_ack, confusing "disc"
Acked-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/usb-backend.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> 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;
>          }
> -- 
> 2.20.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190827/25b20527/attachment.sig>


More information about the Spice-devel mailing list