Bluetooth: HFP HF: Disconnect rfcomm on SLC error
If found error during service level connection disconnect rfcomm. Change-Id: Ida425375975b8d60ab1024d07a8ffe7745ae0b54 Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
This commit is contained in:
parent
b3ac77becd
commit
ccecfaac6a
1 changed files with 7 additions and 0 deletions
|
@ -50,7 +50,14 @@ static const struct {
|
||||||
|
|
||||||
void hf_slc_error(struct at_client *hf_at)
|
void hf_slc_error(struct at_client *hf_at)
|
||||||
{
|
{
|
||||||
|
struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at);
|
||||||
|
int err;
|
||||||
|
|
||||||
BT_ERR("SLC error: disconnecting");
|
BT_ERR("SLC error: disconnecting");
|
||||||
|
err = bt_rfcomm_dlc_disconnect(&hf->rfcomm_dlc);
|
||||||
|
if (err) {
|
||||||
|
BT_ERR("Rfcomm: Unable to disconnect :%d", -err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int hfp_hf_send_cmd(struct bt_hfp_hf *hf, at_resp_cb_t resp,
|
int hfp_hf_send_cmd(struct bt_hfp_hf *hf, at_resp_cb_t resp,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue