]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't raise an error if the migration cookie is NULL
authorDaniel P. Berrange <berrange@redhat.com>
Sat, 4 Jun 2011 10:14:05 +0000 (06:14 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Sat, 4 Jun 2011 11:26:32 +0000 (07:26 -0400)
The v2 migration protocol doesn't use cookies, so we should not
be raising an error if the cookie parameters are NULL.

* src/qemu/qemu_migration.c: Don't raise error if cookie is NULL

src/qemu/qemu_migration.c

index aa74d86e8584541aaea387b4fe451e06b0ef98d0..fa506e23d90f76163d22fe28dd6f6c6c30387784 100644 (file)
@@ -618,11 +618,8 @@ qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
                         int *cookieoutlen,
                         int flags)
 {
-    if (!cookieout || !cookieoutlen) {
-        qemuReportError(VIR_ERR_INVALID_ARG, "%s",
-                        _("missing migration cookie data"));
-        return -1;
-    }
+    if (!cookieout || !cookieoutlen)
+        return 0;
 
     *cookieoutlen = 0;