Re: [PATCH virt-viewer v2 3/3] ovirt: Allow to cancel authentication without showing error dialog

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

 



> 
> On Tue, 2015-03-17 at 15:42 +0100, Pavel Grunt wrote:
> > Related to https://bugzilla.redhat.com/show_bug.cgi?id=1201604
> > ---
> > v2: simplified thanks to [PATCH virt-viewer v2 2/3] Exit normally
> > when canceling dialog
> > ---
> >  src/remote-viewer.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> > index 35493f3..278c06e 100644
> > --- a/src/remote-viewer.c
> > +++ b/src/remote-viewer.c
> > @@ -862,6 +862,10 @@ create_ovirt_session(VirtViewerApp *app, const
> > char *uri, GError **err)
> >                       G_CALLBACK(authenticate_cb), app);
> >  
> >      api = ovirt_proxy_fetch_api(proxy, &error);
> > +    if (virt_viewer_app_get_user_cancelled(app)) {
> > +        g_clear_error(&error);
> > +        goto error;
> > +    }
> >      if (error != NULL) {
> >          g_debug("failed to get oVirt 'api' collection: %s",
> >          error->message);
> >          goto error;
> 
> 
> I must admit that I don't really understand this change. Why was this
> check added here? Surely ovirt_proxy_fetch_api() will not change the
> status of the user_cancelled value?
>
ovirt_proxy_fetch_api() can trigger the authenticate_cb where the user_cancelled is set.

Pavel

_______________________________________________
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