l2cap.c (3cc0a36816a83f4a7d984bd0a0c5dbf930bb8936) | l2cap.c (9f0b00b1541df867db78f6e95a526cc34c1b50e2) |
---|---|
1/* 2 * Copyright (C) 2014 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 --- 3068 unchanged lines hidden (view full) --- 3077 } 3078 // log_info("new state %u", channel->state); 3079} 3080 3081static void l2cap_handle_information_request_complete(hci_connection_t * connection){ 3082 3083 connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_DONE; 3084 | 1/* 2 * Copyright (C) 2014 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 --- 3068 unchanged lines hidden (view full) --- 3077 } 3078 // log_info("new state %u", channel->state); 3079} 3080 3081static void l2cap_handle_information_request_complete(hci_connection_t * connection){ 3082 3083 connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_DONE; 3084 |
3085 // emit event 3086 uint8_t event[8]; 3087 event[0] = L2CAP_EVENT_INFORMATION_RESPONSE; 3088 event[1] = sizeof(event) - 2; 3089 little_endian_store_16(event, 2, connection->con_handle); 3090 little_endian_store_16(event, 4, connection->l2cap_state.extended_feature_mask); 3091 little_endian_store_16(event, 6, connection->l2cap_state.fixed_channels_supported); 3092 l2cap_emit_event(event, sizeof(event)); 3093 |
|
3085 // trigger connection request 3086 btstack_linked_list_iterator_t it; 3087 btstack_linked_list_iterator_init(&it, &l2cap_channels); 3088 while (btstack_linked_list_iterator_has_next(&it)){ 3089 l2cap_channel_t * channel = (l2cap_channel_t *) btstack_linked_list_iterator_next(&it); 3090 if (!l2cap_is_dynamic_channel_type(channel->channel_type)) continue; 3091 if (channel->con_handle != connection->con_handle) continue; 3092 --- 1378 unchanged lines hidden --- | 3094 // trigger connection request 3095 btstack_linked_list_iterator_t it; 3096 btstack_linked_list_iterator_init(&it, &l2cap_channels); 3097 while (btstack_linked_list_iterator_has_next(&it)){ 3098 l2cap_channel_t * channel = (l2cap_channel_t *) btstack_linked_list_iterator_next(&it); 3099 if (!l2cap_is_dynamic_channel_type(channel->channel_type)) continue; 3100 if (channel->con_handle != connection->con_handle) continue; 3101 --- 1378 unchanged lines hidden --- |