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/ :|