hci.c (278ff8a910061d6697d57f96d145e4ac8ac1b587) hci.c (1f468175058d606fc73a98fe6b64c3d28b158b87)
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

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

2243 // handle error: error is reported only to the initiator -> outgoing connection
2244 if (packet[3]){
2245
2246 // handle cancelled outgoing connection
2247 // "If the cancellation was successful then, after the Command Complete event for the LE_Create_Connection_Cancel command,
2248 // either an LE Connection Complete or an LE Enhanced Connection Complete event shall be generated.
2249 // In either case, the event shall be sent with the error code Unknown Connection Identifier (0x02)."
2250 if (packet[3] == ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER){
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

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

2243 // handle error: error is reported only to the initiator -> outgoing connection
2244 if (packet[3]){
2245
2246 // handle cancelled outgoing connection
2247 // "If the cancellation was successful then, after the Command Complete event for the LE_Create_Connection_Cancel command,
2248 // either an LE Connection Complete or an LE Enhanced Connection Complete event shall be generated.
2249 // In either case, the event shall be sent with the error code Unknown Connection Identifier (0x02)."
2250 if (packet[3] == ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER){
2251 // whitelist connect
2252 if (hci_is_le_connection_type(addr_type)){
2253 hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
2254 }
2251 // reset state
2252 hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
2253 hci_stack->le_connecting_request = LE_CONNECTING_IDLE;
2255 // get outgoing connection conn struct for direct connect
2256 conn = gap_get_outgoing_connection();
2257 }
2258
2259 // outgoing le connection establishment is done
2260 if (conn){
2261 // remove entry
2262 btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn);

--- 4263 unchanged lines hidden ---
2254 // get outgoing connection conn struct for direct connect
2255 conn = gap_get_outgoing_connection();
2256 }
2257
2258 // outgoing le connection establishment is done
2259 if (conn){
2260 // remove entry
2261 btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn);

--- 4263 unchanged lines hidden ---