Return-Path: To: linux-bluetooth@vger.kernel.org From: Felipe Ferreri Tonello Subject: BUG: btd_profile's accept not been called from second connection and on Message-ID: <5660D251.1070106@felipetonello.com> Date: Thu, 3 Dec 2015 23:37:53 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020607030100030102060302" Sender: linux-bluetooth-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------020607030100030102060302 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, So the accept function callback from btd_profile is only been called on the first time bluetoothd runs. It never gets called after a disconnection and reconnection. I did git bisect and found the commit that caused it: 4522ac85dd6dc1db4d49507330b4abc3bbaf4e6c But that commit doesn't actually caused the bug. I debugged a little more and found that from the second connection on the service->state is BTD_SERVICE_STATE_CONNECTING instead of BTD_SERVICE_STATE_DISCONNECTED (which is the state when first connecting), thus causing the btd_profile's accept function not to be called in service_accept(). I didn't have time to debug more so I wanted to shout here if anyone has any idea on why this is happening and how to fix it. Thanks in advance, Felipe --------------020607030100030102060302 Content-Type: application/pgp-keys; name="0x92698E6A.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0x92698E6A.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2 mQINBFYedIcBEACVKGKoEjb3zlvAz5SUvBej7Sx13BPd8hVulQD+mqjfuRFPmZA5 LBXPX1zTRWwGEbbZegP3tLfKP+XekzO6BQhDihMmKuRusdgDsdMtldwhjHuUwKn7 kxB2k79jSG802lAjIv2l5hijOfKIGTATKwiMijuXho54DGltIgNyN/Onwk9HnM6d jsV5uubaI468JRH6j8HXXievo24BDvsimIE75ImiM53ruiwPwEry1hi1CnE5OpqG oe/lt27+nLXijfNZOpBZ3Q+RPVBdqPTkMlBJAa4sg+qwZoSMvQJFAGROiJ7+ICCW O4GPMrAn8CRcCI9ENKBj2dQ4bBEP1a+f16GNMUUU37wocqtyNHo0Pa/DnFh91kcu /2dvUX4XPeEimEoSKroRLOXC9RGSFYB/r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8RamVX8lpWaNjUGtVSUOMTaSR1pmQJERDO2/WEZCm5hUFkYDbu+h+9m1W+ KL2ZkyGRC8FoZ46ly1J8koEeEoa57Au/uyK3KyvzlXuCI5zgGE+TohIjOr6d3TN4 SkAyCfQaSw=3D=3D =3DJwBB -----END PGP PUBLIC KEY BLOCK----- --------------020607030100030102060302--