static void usbredir_stop_bulk_receiving(USBRedirDevice *dev, uint8_t ep)
{
    struct usb_redir_stop_bulk_receiving_header stop_bulk = {
        .endpoint = ep,
        .stream_id = 0,
    };
    if (dev->endpoint[EP2I(ep)].bulk_receiving_started) {
        usbredirparser_send_stop_bulk_receiving(dev->parser, 0, &stop_bulk);
        DPRINTF("bulk receiving stopped ep %02X\n", ep);
        dev->endpoint[EP2I(ep)].bulk_receiving_started = 0;
    }
    usbredir_free_bufpq(dev, ep);
}
static void usbredir_stop_bulk_receiving(USBRedirDevice *dev, uint8_t ep)
{
    struct usb_redir_stop_bulk_receiving_header stop_bulk = {
        .endpoint = ep,
        .stream_id = 0,
    };
    if (dev->endpoint[EP2I(ep)].bulk_receiving_started) {
        usbredirparser_send_stop_bulk_receiving(dev->parser, 0, &stop_bulk);
        DPRINTF("bulk receiving stopped ep %02X\n", ep);
        dev->endpoint[EP2I(ep)].bulk_receiving_started = 0;
    }
    usbredir_free_bufpq(dev, ep);
}