From: Matthias Bolte Date: Tue, 13 Jul 2010 20:44:07 +0000 (+0200) Subject: esx: Don't ignore the vcenter query parameter X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1b38e92b7a2c1a055fef4610845884f2ee806faf;p=libvirt.git esx: Don't ignore the vcenter query parameter Since 070f61002f47b602c15d1e4950a122ac9edefe1b the vcenter query parameter has been ignored, because the refactoring to use esxUtil_ParseQuery was incomplete. This effectively broke migration, because the vcenter query parameter is essential for a migration. --- diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 227e6a950f..6f3ebcbe53 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -475,11 +475,18 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED) } /* Login to vCenter */ - if (vCenter != NULL) { + if (parsedQuery->vCenter != NULL) { VIR_FREE(url); VIR_FREE(password); VIR_FREE(username); + vCenter = strdup(parsedQuery->vCenter); + + if (vCenter == NULL) { + virReportOOMError(); + goto cleanup; + } + /* If a vCenter is specified resolve the hostname */ if (STRNEQ(vCenter, "*") && esxUtil_ResolveHostname(vCenter, vCenterIpAddress,