qemu: migration: Make check for empty hook XML robust

Also consider whitespace only strings returned from the hook as empty
result.
This commit is contained in:
Peter Krempa 2014-10-22 11:27:36 +02:00
parent e386779937
commit 19b1ee42b4

View File

@ -2570,7 +2570,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
if (hookret < 0) {
goto cleanup;
} else if (hookret == 0) {
if (!*xmlout) {
if (virStringIsEmpty(xmlout)) {
VIR_DEBUG("Migrate hook filter returned nothing; using the"
" original XML");
} else {