qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] migration: allow clearing migration string para


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] migration: allow clearing migration string parameters
Date: Thu, 2 Mar 2017 12:33:00 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Wed, Mar 01, 2017 at 08:36:03AM -0600, Eric Blake wrote:
> On 03/01/2017 06:32 AM, Daniel P. Berrange wrote:
> >      }
> >      if (params->has_tls_creds) {
> >          g_free(s->parameters.tls_creds);
> > -        s->parameters.tls_creds = g_strdup(params->tls_creds);
> > +        if (*params->tls_creds == '\0') {
> > +            s->parameters.tls_creds = NULL;
> 
> I'm wondering if you should also do s->parameters.has_tls_creds = false
> at this point?  The visitors expect that if has_tls_creds is true, then
> the string is non-NULL.

The fact that s->parameters contains has_* fields is completely ignored
by the migration code afaict. IOW the code behaves as if all the has_*
fields are hardwired to true in s->parameters, even though that is not
the case :-) The has_* fields are only used when the various migration
QMP methods are executed, and those all use a separate MigrationParameters
struct instance. 


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



reply via email to

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