add media con handle to stream endpoint

This commit is contained in:
Milanka Ringwald 2017-04-12 11:34:57 +02:00
parent 9e42cfcc12
commit 57f317a13d
2 changed files with 4 additions and 2 deletions

View File

@ -234,7 +234,8 @@ static void stream_endpoint_state_machine(avdtp_connection_t * connection, avdtp
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED; stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED;
stream_endpoint->connection = connection; stream_endpoint->connection = connection;
stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet); stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet);
printf(" -> AVDTP_STREAM_ENDPOINT_OPENED, stream endpoint %p, connection %p\n", stream_endpoint, connection); stream_endpoint->media_con_handle = l2cap_event_channel_opened_get_handle(packet);
printf(" -> AVDTP_STREAM_ENDPOINT_OPENED, media con handle 0x%02x, l2cap_media_cid 0x%02x\n", stream_endpoint->media_con_handle, stream_endpoint->l2cap_media_cid);
avdtp_streaming_emit_connection_established(context->avdtp_callback, stream_endpoint->l2cap_media_cid, 0); avdtp_streaming_emit_connection_established(context->avdtp_callback, stream_endpoint->l2cap_media_cid, 0);
break; break;
} }

View File

@ -434,6 +434,7 @@ typedef struct avdtp_stream_endpoint {
// original capabilities // original capabilities
avdtp_sep_t sep; avdtp_sep_t sep;
hci_con_handle_t media_con_handle;
uint16_t l2cap_media_cid; uint16_t l2cap_media_cid;
uint16_t l2cap_reporting_cid; uint16_t l2cap_reporting_cid;
uint16_t l2cap_recovery_cid; uint16_t l2cap_recovery_cid;