2009-03-26 14:54:04

by Johan Hedberg

[permalink] [raw]
Subject: [PATCH] Bluetooth: Fix removing of dlc timer with DEFER_SETUP


There seems to be a missing call to rfcomm_dlc_clear_timer when accepting
RFCOMM connections for a socket with DEFER_SETUP. This is easily noticable with
several headsets by them getting disconnected after about 20 seconds even
though the connection from them has been properly accepted on the userspace
side by bluetoothd.

I'm not 100% sure of the correctness of this patch regarding the placement of
this rfcomm_dlc_clear_timer call but it seems to do the trick. What also makes
me a little uncertain is that the issue is not reproducable with some headsets
so there must be *some* code path for accepting connections that does work.
With most dual-profile headsets or those that do more advanced SDP stuff during
the connection setup this is fairly easily reproducable though.

So, any comments about the patch are welcome.


(No filename) (840.00 B)
0001-Bluetooth-Fix-removing-of-dlc-timer-with-DEFER_SETU.patch (1.10 kB)
Download all attachments