• spiiroin's avatar
    [worker] Adjust mtp daemon start/stop timeouts · 566b7a6e
    spiiroin authored
    In devices that have lots of files (say tens of thousands), mtp daemon
    might have trouble getting everything enumerated within 30 second timeout
    allowed by usb-moded.
    
    Use 2 minute timeout for starting, and 15 second timeout for stopping
    mtp daemon.
    
    Implement a generic wait for condition/timeout function that can also
    be interrupted from main thread. Use the wait function for both regular
    blocking sleeps and waiting for mtp daemon starting/stopping.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    566b7a6e
usb_moded-common.h 2.75 KB