Hi, Thanks for taking the time to investigate this. On Nov 25, 2008, at 10:14, Sam Lin wrote:
I traced code and found in some case headset is not unlocked well. for example when something goes wrong in headset_resume_complete(), client->dev = NULL so client_cb() will skip headset_unlock() then headset will be locked forever until restart bluetoothd. I have no idea what's the lock idea behind, BTW still unclear how the problem happens to cause this.
The lock part is used for making sure that only one unix socket client can have read or write access to a remote device at a time. The part that's setting client->dev to NULL seems definitely wrong to me but I'll let Luiz comment on it before making any changes (since according to git blame he was the last one to touch this part of the code). The A2DP resume function has similar logic so it probably needs fixing too.
Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html