]> xenbits.xensource.com Git - libvirt.git/commitdiff
esx: Don't ignore the vcenter query parameter
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 13 Jul 2010 20:44:07 +0000 (22:44 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 24 Jul 2010 15:31:05 +0000 (17:31 +0200)
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.

src/esx/esx_driver.c

index 227e6a950ff34f30a3137f32326baef82b646e63..6f3ebcbe537debea5f82afd543cebbe721de402c 100644 (file)
@@ -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,