+Thu Jul 31 15:37:00 BST 2008 Daniel P. Berrange <berrange@redhat.com>
+
+ * src/domain_conf.c: fix previous patch to ensure port number
+ is kept as '-1' when autoport is set, and the domain is not
+ running.
+
Thu Jul 31 14:27:00 CEST 2008 Chris Lalancette <clalance@redhat.com>
* src/domain_conf.c: patch from Charles Duffy to make sure we print
static int
virDomainGraphicsDefFormat(virConnectPtr conn,
virBufferPtr buf,
+ virDomainDefPtr vm,
virDomainGraphicsDefPtr def,
int flags)
{
switch (def->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
- if (def->data.vnc.port)
+ if (def->data.vnc.port &&
+ (!def->data.vnc.autoport || vm->id != -1))
virBufferVSprintf(buf, " port='%d'",
def->data.vnc.port);
else if (def->data.vnc.autoport)
if (virDomainInputDefFormat(conn, &buf, &autoInput) < 0)
goto cleanup;
- if (virDomainGraphicsDefFormat(conn, &buf, def->graphics, flags) < 0)
+ if (virDomainGraphicsDefFormat(conn, &buf, def, def->graphics, flags) < 0)
goto cleanup;
}