Revision e9b382b0

b/hw/virtio-serial-bus.c
442 442
{
443 443
    VirtIOSerial *vser;
444 444
    VirtIOSerialPort *port;
445
    bool discard;
446 445

  
447 446
    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
448 447
    port = find_port_by_vq(vser, vq);
449 448

  
450
    discard = false;
451 449
    if (!port || !port->host_connected || !port->info->have_data) {
452
        discard = true;
453
    }
454

  
455
    if (discard) {
456 450
        discard_vq_data(vq, vdev);
457 451
        return;
458 452
    }
459
    if (port->throttled) {
453

  
454
    if (!port->throttled) {
455
        do_flush_queued_data(port, vq, vdev);
460 456
        return;
461 457
    }
462

  
463
    do_flush_queued_data(port, vq, vdev);
464 458
}
465 459

  
466 460
static void handle_input(VirtIODevice *vdev, VirtQueue *vq)

Also available in: Unified diff