qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 9/9] ui: convert VNC server to use QCryptoTLS


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v5 9/9] ui: convert VNC server to use QCryptoTLSSession
Date: Wed, 2 Sep 2015 12:06:39 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Sep 01, 2015 at 09:08:11AM -0600, Eric Blake wrote:
> On 08/26/2015 09:05 AM, Daniel P. Berrange wrote:

> > +++ b/ui/vnc.c
> 
> > @@ -3301,13 +3303,12 @@ static QemuOptsList qemu_vnc_opts = {
> >  };
> >  
> >  
> > -static void
> > +static int
> >  vnc_display_setup_auth(VncDisplay *vs,
> >                         bool password,
> >                         bool sasl,
> > -                       bool tls,
> > -                       bool x509,
> > -                       bool websocket)
> > +                       bool websocket,
> > +                       Error **errp)
> >  {
> 
> Adding a return value and an errp pointer? Can't callers just check
> whether errp was set, and then you can leave this as returning void?

If we leave this function void, then the caller is forced to use a
local Error and error_propagate(), since it is forbidden to de-reference
the Error ** it already has. So this means the caller can just do a
plain < 0 check for failure which is shorter & simpler.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]