• Marcel Holtmann's avatar
    [Bluetooth] Move pending packets from RFCOMM socket to TTY · a0c22f22
    Marcel Holtmann authored
    When an incoming RFCOMM socket connection gets converted into a TTY,
    it can happen that packets are lost. This mainly happens with the
    Handsfree profile where the remote side starts sending data right
    away. The problem is that these packets are in the socket receive
    queue. So when creating the TTY make sure to copy all pending packets
    from the socket receive queue to a private queue inside the TTY.
    
    To make this actually work, the flow control on the newly created TTY
    will be disabled and only enabled again when the TTY is opened by an
    application. And right before that, the pending packets will be put
    into the TTY flip buffer.
    Signed-off-by: default avatarDenis Kenzior <denis.kenzior@trolltech.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    a0c22f22
core.c 47.7 KB