conf: properly skip graphics listen element in migratable XML

We should skip <listen type='socket'/> only if the 'socket' path
is specified because if there is no 'socket' path we need to
keep that element in migratable XML.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1366088

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2017-02-27 17:16:17 +01:00
parent cd4a8b9304
commit cba1672de8

View File

@ -23134,6 +23134,7 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
* thus we can generate it in the migrateble XML. */
if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
def->listens[i].type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET &&
def->listens[i].socket &&
!def->listens[i].autoGenerated)
continue;