Re: [PATCH 2/2] Ensure auto-conf is only done once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, sorry, this one depends on another patch, ignore for now.

----- Original Message -----
> From: "Jonathon Jongsma" <jjongsma@xxxxxxxxxx>
> To: "Marc-André Lureau" <mlureau@xxxxxxxxxx>
> Cc: virt-tools-list@xxxxxxxxxx
> Sent: Tuesday, November 12, 2013 11:39:01 AM
> Subject: Re:  [PATCH 2/2] Ensure auto-conf is only done once
> 
> Also need somebody to push this one :/
> 
> 
> 
> ----- Original Message -----
> > From: "Marc-André Lureau" <mlureau@xxxxxxxxxx>
> > To: "Jonathon Jongsma" <jjongsma@xxxxxxxxxx>
> > Cc: virt-tools-list@xxxxxxxxxx
> > Sent: Friday, November 8, 2013 4:15:04 PM
> > Subject: Re:  [PATCH 2/2] Ensure auto-conf is only done
> > once
> > 
> > 
> > 
> > ----- Original Message -----
> > > Auto-conf should only happen at startup. It is triggered from several
> > > places
> > > due
> > > to the somewhat unreliable ordering of events, but that doesn't mean we
> > > want
> > > to
> > > run it several times. This patch ensures that we only do it once.
> > > ---
> > >  src/virt-viewer-session-spice.c | 9 +++++++++
> > >  1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/src/virt-viewer-session-spice.c
> > > b/src/virt-viewer-session-spice.c
> > > index 41467cf..68cf984 100644
> > > --- a/src/virt-viewer-session-spice.c
> > > +++ b/src/virt-viewer-session-spice.c
> > > @@ -55,6 +55,7 @@ struct _VirtViewerSessionSpicePrivate {
> > >      int usbredir_channel_count;
> > >      gboolean has_sw_smartcard_reader;
> > >      guint pass_try;
> > > +    gboolean did_auto_conf;
> > >  };
> > >  
> > >  #define VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(o)
> > >  (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_SPICE,
> > >  VirtViewerSessionSpicePrivate))
> > > @@ -726,6 +727,13 @@
> > > virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice
> > > *self)
> > >      gint i;
> > >      gsize ndisplays = 0;
> > >  
> > > +    /* only do auto-conf once at startup. Avoid repeating auto-conf
> > > later
> > > due to
> > > +     * agent disconnection/re-connection, etc */
> > > +    if (self->priv->did_auto_conf) {
> > > +        DEBUG_LOG("Already did auto-conf, skipping");
> > > +        return FALSE;
> > > +    }
> > > +
> > 
> > ack
> > 
> > >      app = virt_viewer_session_get_app(VIRT_VIEWER_SESSION(self));
> > >      g_return_val_if_fail(VIRT_VIEWER_IS_APP(app), TRUE);
> > >  
> > > @@ -770,6 +778,7 @@
> > > virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice
> > > *self)
> > >      }
> > >  
> > >      spice_main_send_monitor_config(cmain);
> > > +    self->priv->did_auto_conf = TRUE;
> > >      return TRUE;
> > >  }
> > >  
> > > --
> > > 1.8.3.1
> > > 
> > > _______________________________________________
> > > virt-tools-list mailing list
> > > virt-tools-list@xxxxxxxxxx
> > > https://www.redhat.com/mailman/listinfo/virt-tools-list
> > > 
> > 
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux