• spiiroin's avatar
    [udev] Ignore stale events received while blocked in mode transition · d6c8a598
    spiiroin authored
    Mode transition blocks udev event processing. If user disconnects and
    reconnects the cable multiple times during the blockade, usb-moded
    will act on stale events that might not reflect the actual state of
    the usb connection.
    Handle disconnects immediately, but delay acting on connects so that
    sequences of multiple disconnects and connects get compressed into
    single transition to undefined mode possibly followed by single
    transition to appropriated connected mode.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
usb_moded-udev.c 19.8 KB