X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=spice-qemu-char.c;h=6d147a7ece26a79f6af8838e4d22afd5e3ea6e81;hb=52510f8b2c0486e6c2743b1d069b3584ef4524da;hp=ff95fcbe011d56f9dfed2f35c4945d1a56949d10;hpb=b010cec86b9a4a0b63162cd27e37c2d99e90ed66;p=qemu.git diff --git a/spice-qemu-char.c b/spice-qemu-char.c index ff95fcbe0..6d147a7ec 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -35,7 +35,8 @@ static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len) uint8_t* p = (uint8_t*)buf; while (len > 0) { - last_out = MIN(len, qemu_chr_be_can_write(scd->chr)); + int can_write = qemu_chr_be_can_write(scd->chr); + last_out = MIN(len, can_write); if (last_out <= 0) { break; } @@ -254,6 +255,7 @@ static CharDriverState *chr_open(const char *subtype) chr->chr_add_watch = spice_chr_add_watch; chr->chr_close = spice_chr_close; chr->chr_set_fe_open = spice_chr_set_fe_open; + chr->explicit_be_open = true; QLIST_INSERT_HEAD(&spice_chars, s, next);