Hi Szymon, On 30 October 2014 11:23, Szymon Janc <szymon.janc@xxxxxxxxx> wrote: > Hi Łukasz, > > On Thursday 30 of October 2014 00:07:33 Lukasz Rymanowski wrote: >> In case of any issue during SLC creation lets just drop the link >> --- >> android/handsfree.c | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/android/handsfree.c b/android/handsfree.c >> index 595919a..c8d3c04 100644 >> --- a/android/handsfree.c >> +++ b/android/handsfree.c >> @@ -1251,6 +1251,9 @@ static void at_cmd_cind(struct hfp_gw_result *result, >> enum hfp_gw_cmd_type type, } >> >> hfp_gw_send_result(dev->gw, HFP_RESULT_ERROR); >> + >> + if (dev->state != HAL_EV_HANDSFREE_CONN_STATE_SLC_CONNECTED) >> + hfp_gw_disconnect(dev->gw); >> } >> >> static void at_cmd_brsf(struct hfp_gw_result *result, enum hfp_gw_cmd_type >> type, @@ -1280,6 +1283,9 @@ static void at_cmd_brsf(struct hfp_gw_result >> *result, enum hfp_gw_cmd_type type, } >> >> hfp_gw_send_result(dev->gw, HFP_RESULT_ERROR); >> + >> + if (dev->state != HAL_EV_HANDSFREE_CONN_STATE_SLC_CONNECTED) >> + hfp_gw_disconnect(dev->gw); >> } >> >> static void at_cmd_chld(struct hfp_gw_result *result, enum hfp_gw_cmd_type >> type, @@ -1319,6 +1325,9 @@ static void at_cmd_chld(struct hfp_gw_result >> *result, enum hfp_gw_cmd_type type, } >> >> hfp_gw_send_result(dev->gw, HFP_RESULT_ERROR); >> + >> + if (dev->state != HAL_EV_HANDSFREE_CONN_STATE_SLC_CONNECTED) >> + hfp_gw_disconnect(dev->gw); >> } >> >> static struct hfp_codec *find_codec_by_type(struct hf_device *dev, uint8_t >> type) @@ -1392,6 +1401,9 @@ static void at_cmd_bac(struct hfp_gw_result >> *result, enum hfp_gw_cmd_type type, >> >> failed: >> hfp_gw_send_result(dev->gw, HFP_RESULT_ERROR); >> + >> + if (dev->state != HAL_EV_HANDSFREE_CONN_STATE_SLC_CONNECTED) >> + hfp_gw_disconnect(dev->gw); >> } >> >> static void register_slc_at(struct hf_device *dev) > > In general I agree with dropping connection if there are any issues with SLC > creation. But it looks like you miss AT+CMER command. True, will fix that. > > -- > BR > Szymon Janc \Łukasz -- 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