diff --git a/src/classic/avrcp.c b/src/classic/avrcp.c index 3e722551a..3458fa679 100644 --- a/src/classic/avrcp.c +++ b/src/classic/avrcp.c @@ -558,14 +558,14 @@ void avrcp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, break; } - if (!sdp_query_context->parse_sdp_record){ + if (!sdp_query_context->avrcp_l2cap_psm){ connection->state = AVCTP_CONNECTION_IDLE; + log_info("AVRCP: no suitable service found"); avrcp_emit_connection_established(sdp_query_context->avrcp_callback, connection->avrcp_cid, connection->remote_addr, SDP_SERVICE_NOT_FOUND); btstack_linked_list_remove(&sdp_query_context->connections, (btstack_linked_item_t*) connection); btstack_memory_avrcp_connection_free(connection); break; } - // log_info("AVRCP Control PSM 0x%02x, Browsing PSM 0x%02x", sdp_query_context->avrcp_l2cap_psm, sdp_query_context->browsing_l2cap_psm); connection->state = AVCTP_CONNECTION_W4_L2CAP_CONNECTED; l2cap_create_channel(sdp_query_context->packet_handler, connection->remote_addr, sdp_query_context->avrcp_l2cap_psm, l2cap_max_mtu(), NULL); break;