Bluetooth: HFP HF: Indicate disconnect to application

Invoke disconnected application callback when rfcomm is disconnected.

Change-Id: Icdefa8ee0b8f061f7db75a73e7f7ed4044817c5a
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
This commit is contained in:
Sathish Narasimman 2017-01-27 12:00:23 +05:30 committed by Szymon Janc
commit 8fe69090e5

View file

@ -477,7 +477,12 @@ static void hfp_hf_connected(struct bt_rfcomm_dlc *dlc)
static void hfp_hf_disconnected(struct bt_rfcomm_dlc *dlc) static void hfp_hf_disconnected(struct bt_rfcomm_dlc *dlc)
{ {
struct bt_conn *conn = dlc->session->br_chan.chan.conn;
BT_DBG("hf disconnected!"); BT_DBG("hf disconnected!");
if (bt_hf->disconnected) {
bt_hf->disconnected(conn);
}
} }
static void hfp_hf_recv(struct bt_rfcomm_dlc *dlc, struct net_buf *buf) static void hfp_hf_recv(struct bt_rfcomm_dlc *dlc, struct net_buf *buf)