mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
avdtp: fix typo in log info msgs
This commit is contained in:
parent
59e36844b7
commit
355ac55311
@ -356,7 +356,7 @@ static void handle_l2cap_data_packet_for_signaling_connection(avdtp_connection_t
|
||||
static void avdtp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
avdtp_connection_t * connection = avdtp_connection_for_avdtp_cid(sdp_query_context->avdtp_cid, sdp_query_context);
|
||||
if (!connection) {
|
||||
log_error("Ndp query, connection with 0x%02x cid not found", sdp_query_context->avdtp_cid);
|
||||
log_error("SDP query, connection with 0x%02x cid not found", sdp_query_context->avdtp_cid);
|
||||
return;
|
||||
}
|
||||
if (connection->state != AVDTP_SIGNALING_W4_SDP_QUERY_COMPLETE) return;
|
||||
@ -460,21 +460,21 @@ static void avdtp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t c
|
||||
avdtp_signaling_emit_connection_established(sdp_query_context->avdtp_callback, sdp_query_context->avdtp_cid, connection->remote_addr, status);
|
||||
btstack_linked_list_remove(&sdp_query_context->connections, (btstack_linked_item_t*) connection);
|
||||
btstack_memory_avdtp_connection_free(connection);
|
||||
log_info("NDP query failed with status 0x%02x.", status);
|
||||
log_info("SDP query failed with status 0x%02x.", status);
|
||||
break;
|
||||
}
|
||||
if (!sdp_query_context->role_supported){
|
||||
btstack_linked_list_remove(&sdp_query_context->connections, (btstack_linked_item_t*) connection);
|
||||
btstack_memory_avdtp_connection_free(connection);
|
||||
avdtp_signaling_emit_connection_established(sdp_query_context->avdtp_callback, sdp_query_context->avdtp_cid, connection->remote_addr, SDP_SERVICE_NOT_FOUND);
|
||||
log_info("NDP query, remote device does not support required role.");
|
||||
log_info("SDP query, remote device does not support required role.");
|
||||
break;
|
||||
}
|
||||
if (!sdp_query_context->avdtp_l2cap_psm) {
|
||||
btstack_linked_list_remove(&sdp_query_context->connections, (btstack_linked_item_t*)connection);
|
||||
btstack_memory_avdtp_connection_free(connection);
|
||||
avdtp_signaling_emit_connection_established(sdp_query_context->avdtp_callback, sdp_query_context->avdtp_cid, connection->remote_addr, L2CAP_SERVICE_DOES_NOT_EXIST);
|
||||
log_info("NDP query, no l2cap psm found.");
|
||||
log_info("SDP query, no l2cap psm found.");
|
||||
break;
|
||||
}
|
||||
connection->state = AVDTP_SIGNALING_CONNECTION_W4_L2CAP_CONNECTED;
|
||||
@ -546,27 +546,27 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
l2cap_event_incoming_connection_get_address(packet, event_addr);
|
||||
local_cid = l2cap_event_incoming_connection_get_local_cid(packet);
|
||||
connection = avdtp_connection_for_bd_addr(event_addr, context);
|
||||
log_info("N2CAP_EVENT_INCOMING_CONNECTION, local cid 0x%02x ", local_cid);
|
||||
log_info("L2CAP_EVENT_INCOMING_CONNECTION, local cid 0x%02x ", local_cid);
|
||||
if (connection){
|
||||
log_info("Nonnection state %d", connection->state);
|
||||
log_info("Connection state %d", connection->state);
|
||||
}
|
||||
if (!connection || connection->state == AVDTP_SIGNALING_CONNECTION_W4_L2CAP_CONNECTED){
|
||||
connection = avdtp_create_connection(event_addr, context);
|
||||
connection->is_initiator = 0;
|
||||
log_info("N2CAP_EVENT_INCOMING_CONNECTION: role is_initiator %d", connection->is_initiator);
|
||||
log_info("L2CAP_EVENT_INCOMING_CONNECTION: role is_initiator %d", connection->is_initiator);
|
||||
connection->state = AVDTP_SIGNALING_CONNECTION_W4_L2CAP_CONNECTED;
|
||||
log_info("N2CAP_EVENT_INCOMING_CONNECTION, connection %p, state connection %d, avdtp cid 0x%02x", connection, connection->state, connection->avdtp_cid);
|
||||
log_info("L2CAP_EVENT_INCOMING_CONNECTION, connection %p, state connection %d, avdtp cid 0x%02x", connection, connection->state, connection->avdtp_cid);
|
||||
l2cap_accept_connection(local_cid);
|
||||
break;
|
||||
}
|
||||
|
||||
stream_endpoint = avdtp_stream_endpoint_for_seid(connection->local_seid, context);
|
||||
if (!stream_endpoint) {
|
||||
log_info("N2CAP_EVENT_INCOMING_CONNECTION no streamendpoint found for seid %d", connection->local_seid);
|
||||
log_info("L2CAP_EVENT_INCOMING_CONNECTION no streamendpoint found for seid %d", connection->local_seid);
|
||||
break;
|
||||
}
|
||||
|
||||
log_info("Nhecking l2cap_media_cid %d, for local seid %d, state of stream endpoint %d, role is_initiator %d", stream_endpoint->l2cap_media_cid, connection->local_seid, stream_endpoint->state, connection->is_initiator);
|
||||
log_info("Checking l2cap_media_cid %d, for local seid %d, state of stream endpoint %d, role is_initiator %d", stream_endpoint->l2cap_media_cid, connection->local_seid, stream_endpoint->state, connection->is_initiator);
|
||||
if (stream_endpoint->l2cap_media_cid == 0){
|
||||
if (connection->is_initiator){
|
||||
l2cap_decline_connection(local_cid);
|
||||
@ -581,7 +581,7 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
case L2CAP_EVENT_CHANNEL_OPENED:
|
||||
psm = l2cap_event_channel_opened_get_psm(packet);
|
||||
if (psm != BLUETOOTH_PROTOCOL_AVDTP){
|
||||
log_info("Nnexpected PSM - Not implemented yet, avdtp sink: L2CAP_EVENT_CHANNEL_OPENED ");
|
||||
log_info("Unexpected PSM - Not implemented yet, avdtp sink: L2CAP_EVENT_CHANNEL_OPENED ");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -591,50 +591,50 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
local_cid = l2cap_event_channel_opened_get_local_cid(packet);
|
||||
connection = avdtp_connection_for_bd_addr(event_addr, context);
|
||||
|
||||
log_info("N2CAP_EVENT_CHANNEL_OPENED: status %d, cid 0x%02x , signaling connection %p ", status, local_cid, connection);
|
||||
log_info("L2CAP_EVENT_CHANNEL_OPENED: status %d, cid 0x%02x , signaling connection %p ", status, local_cid, connection);
|
||||
connection = avdtp_connection_for_bd_addr(event_addr, context);
|
||||
if (!connection){
|
||||
log_info("N2CAP_EVENT_CHANNEL_OPENED 2: status %d, signaling connection %p ", status, connection);
|
||||
log_info("L2CAP_EVENT_CHANNEL_OPENED 2: status %d, signaling connection %p ", status, connection);
|
||||
break;
|
||||
}
|
||||
|
||||
if (connection->l2cap_signaling_cid == 0) {
|
||||
if (status){
|
||||
log_info("N2CAP connection to %s failed. status code 0x%02x", bd_addr_to_str(event_addr), status);
|
||||
log_info("L2CAP connection to %s failed. status code 0x%02x", bd_addr_to_str(event_addr), status);
|
||||
connection->state = AVDTP_SIGNALING_CONNECTION_IDLE;
|
||||
connection->l2cap_signaling_cid = 0;
|
||||
avdtp_signaling_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, l2cap_event_channel_opened_get_status(packet));
|
||||
break;
|
||||
}
|
||||
if (connection->state != AVDTP_SIGNALING_CONNECTION_W4_L2CAP_CONNECTED) {
|
||||
log_info("N2CAP connection to %s failed. status code 0x%02x", bd_addr_to_str(event_addr), status);
|
||||
log_info("L2CAP connection to %s failed. status code 0x%02x", bd_addr_to_str(event_addr), status);
|
||||
avdtp_signaling_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, AVDTP_CONNECTION_IN_WRONG_STATE);
|
||||
break;
|
||||
}
|
||||
connection->l2cap_signaling_cid = local_cid;
|
||||
connection->local_seid = 0;
|
||||
connection->state = AVDTP_SIGNALING_CONNECTION_OPENED;
|
||||
log_info("NVDTP_SIGNALING_CONNECTION_OPENED, connection %p, l2cap_signaling_cid 0x%02x, avdtp_cid 0x%02x", connection, local_cid, connection->avdtp_cid);
|
||||
log_info("AVDTP_SIGNALING_CONNECTION_OPENED, connection %p, l2cap_signaling_cid 0x%02x, avdtp_cid 0x%02x", connection, local_cid, connection->avdtp_cid);
|
||||
avdtp_signaling_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
stream_endpoint = avdtp_stream_endpoint_for_seid(connection->local_seid, context);
|
||||
if (!stream_endpoint){
|
||||
log_info("N2CAP_EVENT_CHANNEL_OPENED: stream_endpoint not found");
|
||||
log_info("L2CAP_EVENT_CHANNEL_OPENED: stream_endpoint not found");
|
||||
return;
|
||||
}
|
||||
|
||||
if (stream_endpoint->l2cap_media_cid == 0){
|
||||
status = l2cap_event_channel_opened_get_status(packet);
|
||||
if (status){
|
||||
log_info("NVDTP_STREAM_ENDPOINT_OPENED failed with status %d, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", status, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
log_info("AVDTP_STREAM_ENDPOINT_OPENED failed with status %d, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", status, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_IDLE;
|
||||
avdtp_streaming_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint), status);
|
||||
break;
|
||||
}
|
||||
if (stream_endpoint->state != AVDTP_STREAM_ENDPOINT_W4_L2CAP_FOR_MEDIA_CONNECTED){
|
||||
log_info("NVDTP_STREAM_ENDPOINT_OPENED failed - stream endpoint in wrong state %d, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", stream_endpoint->state, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
log_info("AVDTP_STREAM_ENDPOINT_OPENED failed - stream endpoint in wrong state %d, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", stream_endpoint->state, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
avdtp_streaming_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint), AVDTP_STREAM_ENDPOINT_IN_WRONG_STATE);
|
||||
break;
|
||||
}
|
||||
@ -644,7 +644,7 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet);
|
||||
stream_endpoint->media_con_handle = l2cap_event_channel_opened_get_handle(packet);
|
||||
|
||||
log_info("NVDTP_STREAM_ENDPOINT_OPENED, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
log_info("AVDTP_STREAM_ENDPOINT_OPENED, avdtp cid 0x%02x, l2cap_media_cid 0x%02x, local seid %d, remote seid %d", connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint));
|
||||
avdtp_streaming_emit_connection_established(context->avdtp_callback, connection->avdtp_cid, event_addr, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint), 0);
|
||||
return;
|
||||
}
|
||||
@ -669,13 +669,13 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
break;
|
||||
}
|
||||
if (stream_endpoint->l2cap_recovery_cid == local_cid){
|
||||
log_info("N2CAP_EVENT_CHANNEL_CLOSED recovery cid 0x%0x", local_cid);
|
||||
log_info("L2CAP_EVENT_CHANNEL_CLOSED recovery cid 0x%0x", local_cid);
|
||||
stream_endpoint->l2cap_recovery_cid = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (stream_endpoint->l2cap_reporting_cid == local_cid){
|
||||
log_info("N2CAP_EVENT_CHANNEL_CLOSED reporting cid 0x%0x", local_cid);
|
||||
log_info("L2CAP_EVENT_CHANNEL_CLOSED reporting cid 0x%0x", local_cid);
|
||||
stream_endpoint->l2cap_reporting_cid = 0;
|
||||
break;
|
||||
}
|
||||
@ -712,7 +712,7 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
avdtp_handle_can_send_now(connection, channel, context);
|
||||
break;
|
||||
default:
|
||||
log_info("Nnknown HCI event type %02x", hci_event_packet_get_type(packet));
|
||||
log_info("Unknown HCI event type %02x", hci_event_packet_get_type(packet));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user