avdtp_acceptor.c (2d9d000f0d11d477d59a9de47a953eafddb31c49) avdtp_acceptor.c (61fb88e19d4865881ff85bb84d6ffbc95339ce1c)
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 111 unchanged lines hidden (view full) ---

120 log_info("ACP: update seid %d, to %p", stream_endpoint->remote_sep.seid, stream_endpoint);
121 }
122 } else {
123 // add new
124 log_info("ACP: seid %d not found in %p", sep.seid, stream_endpoint);
125 stream_endpoint->remote_sep = sep;
126 log_info("ACP: add seid %d, to %p", stream_endpoint->remote_sep.seid, stream_endpoint);
127 }
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 111 unchanged lines hidden (view full) ---

120 log_info("ACP: update seid %d, to %p", stream_endpoint->remote_sep.seid, stream_endpoint);
121 }
122 } else {
123 // add new
124 log_info("ACP: seid %d not found in %p", sep.seid, stream_endpoint);
125 stream_endpoint->remote_sep = sep;
126 log_info("ACP: add seid %d, to %p", stream_endpoint->remote_sep.seid, stream_endpoint);
127 }
128
129 avdtp_emit_configuration(context->avdtp_callback, connection->avdtp_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint), &sep.configuration, sep.configured_service_categories);
128
129 avdtp_emit_configuration(stream_endpoint, connection->avdtp_cid, &sep.configuration, sep.configured_service_categories);
130 avdtp_signaling_emit_accept(context->avdtp_callback, connection->avdtp_cid, avdtp_local_seid(stream_endpoint), connection->acceptor_signaling_packet.signal_identifier, false);
131}
132
133void avdtp_acceptor_stream_config_subsm(avdtp_connection_t * connection, uint8_t * packet, uint16_t size, int offset, avdtp_context_t * context){
134 avdtp_stream_endpoint_t * stream_endpoint = NULL;
135 connection->acceptor_transaction_label = connection->acceptor_signaling_packet.transaction_label;
136 if (!avdtp_acceptor_validate_msg_length(connection->acceptor_signaling_packet.signal_identifier, size)) {
137 connection->error_code = BAD_LENGTH;

--- 152 unchanged lines hidden (view full) ---

290 connection->reject_signal_identifier = connection->acceptor_signaling_packet.signal_identifier;
291 break;
292 }
293 stream_endpoint->remote_sep.configured_service_categories = sep.configured_service_categories;
294 stream_endpoint->remote_sep.configuration = sep.configuration;
295
296 log_info("ACP: update active remote seid %d", stream_endpoint->remote_sep.seid);
297
130 avdtp_signaling_emit_accept(context->avdtp_callback, connection->avdtp_cid, avdtp_local_seid(stream_endpoint), connection->acceptor_signaling_packet.signal_identifier, false);
131}
132
133void avdtp_acceptor_stream_config_subsm(avdtp_connection_t * connection, uint8_t * packet, uint16_t size, int offset, avdtp_context_t * context){
134 avdtp_stream_endpoint_t * stream_endpoint = NULL;
135 connection->acceptor_transaction_label = connection->acceptor_signaling_packet.transaction_label;
136 if (!avdtp_acceptor_validate_msg_length(connection->acceptor_signaling_packet.signal_identifier, size)) {
137 connection->error_code = BAD_LENGTH;

--- 152 unchanged lines hidden (view full) ---

290 connection->reject_signal_identifier = connection->acceptor_signaling_packet.signal_identifier;
291 break;
292 }
293 stream_endpoint->remote_sep.configured_service_categories = sep.configured_service_categories;
294 stream_endpoint->remote_sep.configuration = sep.configuration;
295
296 log_info("ACP: update active remote seid %d", stream_endpoint->remote_sep.seid);
297
298 avdtp_emit_configuration(context->avdtp_callback, connection->avdtp_cid, avdtp_local_seid(stream_endpoint), avdtp_remote_seid(stream_endpoint), &sep.configuration, sep.configured_service_categories);
298 avdtp_emit_configuration(stream_endpoint, connection->avdtp_cid, &sep.configuration, sep.configured_service_categories);
299 break;
300 }
301
302 case AVDTP_SI_GET_CONFIGURATION:
303 log_info("ACP: AVDTP_ACCEPTOR_W2_ANSWER_GET_CONFIGURATION");
304 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ANSWER_GET_CONFIGURATION;
305 break;
306 case AVDTP_SI_OPEN:

--- 320 unchanged lines hidden ---
299 break;
300 }
301
302 case AVDTP_SI_GET_CONFIGURATION:
303 log_info("ACP: AVDTP_ACCEPTOR_W2_ANSWER_GET_CONFIGURATION");
304 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ANSWER_GET_CONFIGURATION;
305 break;
306 case AVDTP_SI_OPEN:

--- 320 unchanged lines hidden ---