Adjust virLXCDriverGetCapabilities to fill in driver->caps if it is
empty, regardless of the passed 'refresh' value. This matches the
pattern used in virQEMUDriverGetCapabilities
This fixes LXC XML startup parsing for me
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
driver->caps = caps;
} else {
lxcDriverLock(driver);
+
+ if (driver->caps == NULL) {
+ VIR_DEBUG("Capabilities didn't detect any guests. Forcing a "
+ "refresh.");
+ lxcDriverUnlock(driver);
+ return virLXCDriverGetCapabilities(driver, true);
+ }
}
ret = virObjectRef(driver->caps);