• M
    [Bluetooth] Move pending packets from RFCOMM socket to TTY · a0c22f22
    Marcel Holtmann 提交于
    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: NDenis Kenzior <denis.kenzior@trolltech.com>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    a0c22f22
core.c 47.7 KB