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) { if (hookret < 0) {
goto cleanup; goto cleanup;
} else if (hookret == 0) { } else if (hookret == 0) {
if (!*xmlout) { if (virStringIsEmpty(xmlout)) {
VIR_DEBUG("Migrate hook filter returned nothing; using the" VIR_DEBUG("Migrate hook filter returned nothing; using the"
" original XML"); " original XML");
} else { } else {