]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Fix JSON migrate_set_downtime command
authorJiri Denemark <jdenemar@redhat.com>
Thu, 19 Aug 2010 13:59:25 +0000 (15:59 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 20 Aug 2010 14:26:28 +0000 (16:26 +0200)
src/qemu/qemu_monitor_json.c

index e8609aa718a3cae0b723dffea46b1ccd0d0dcd5e..8a586bc3210e4dd2cdad014bc97114574b97b6fb 100644 (file)
@@ -1481,17 +1481,12 @@ int qemuMonitorJSONSetMigrationDowntime(qemuMonitorPtr mon,
                                         unsigned long long downtime)
 {
     int ret;
-    char *downtimestr;
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;
-    if (virAsprintf(&downtimestr, "%llums", downtime) < 0) {
-        virReportOOMError();
-        return -1;
-    }
+
     cmd = qemuMonitorJSONMakeCommand("migrate_set_downtime",
-                                     "s:value", downtimestr,
+                                     "d:value", downtime / 1000.0,
                                      NULL);
-    VIR_FREE(downtimestr);
     if (!cmd)
         return -1;