avdtp.c (39a45651736129304464e0cd5b886280521e222c) avdtp.c (535ff08864b82637cff34e1d87d909d95d58753f)
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

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

966 }
967 if (stream_endpoint->l2cap_reporting_cid == local_cid){
968 avdtp_handle_close_reporting_channel(stream_endpoint);
969 break;
970 }
971 }
972
973 if (connection){
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

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

966 }
967 if (stream_endpoint->l2cap_reporting_cid == local_cid){
968 avdtp_handle_close_reporting_channel(stream_endpoint);
969 break;
970 }
971 }
972
973 if (connection){
974 btstack_linked_list_iterator_t it;
974 // closing signaling channel invalidates all other channels as well
975 btstack_linked_list_iterator_t it;
975 btstack_linked_list_iterator_init(&it, avdtp_get_stream_endpoints());
976 while (btstack_linked_list_iterator_has_next(&it)){
977 stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterator_next(&it);
978 if (stream_endpoint->connection == connection){
976 btstack_linked_list_iterator_init(&it, avdtp_get_stream_endpoints());
977 while (btstack_linked_list_iterator_has_next(&it)){
978 stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterator_next(&it);
979 if (stream_endpoint->connection == connection){
980 avdtp_handle_close_recovery_channel(stream_endpoint);
981 avdtp_handle_close_reporting_channel(stream_endpoint);
982 avdtp_handle_close_media_channel(stream_endpoint);
979 avdtp_reset_stream_endpoint(stream_endpoint);
980 }
981 }
982 avdtp_signaling_emit_connection_released(connection->avdtp_cid);
983 avdtp_finalize_connection(connection);
984 break;
985 }
986 break;

--- 517 unchanged lines hidden ---
983 avdtp_reset_stream_endpoint(stream_endpoint);
984 }
985 }
986 avdtp_signaling_emit_connection_released(connection->avdtp_cid);
987 avdtp_finalize_connection(connection);
988 break;
989 }
990 break;

--- 517 unchanged lines hidden ---