}
} else if (ret == BLUETOOTH_ERROR_NONE) {
BT_INFO("Waiting for disconnection...");
- /*
- * It means, we dont need pending connect info as only A2DP (Src/Snk) or
- * HFP will be connected for present device, so lets free pending info.
- */
- g_free(info->address);
- g_free(info);
+
+ if ((info->is_hfp_supported && info->is_a2dp_sink_supported) ||
+ (info->is_hfp_supported && info->is_a2dp_src_supported)) {
+ BT_INFO("[%s] Supports HFP and (A2DP_Src or, A2DP_Snk)", info->address);
+ pending_audio_conn_list = g_slist_append(pending_audio_conn_list, (gpointer)info);
+ } else {
+ BT_INFO("[%s] Supports one profile only", info->address);
+ /*
+ * It means, we dont need pending connect info as only A2DP (Src/Snk) or
+ * HFP will be connected for present device, so lets free pending info.
+ */
+ g_free(info->address);
+ g_free(info);
+ }
}
BT_DBG("-");