hci.c (c874aa4683fe7d6ee3a2c4669e2991316ad6299e) | hci.c (4dbe0476f2747f7334f34bae9fdeb5c33940f1cd) |
---|---|
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 --- 3348 unchanged lines hidden (view full) --- 3357 } 3358 3359 // free connection if cancelled by user (request == IDLE) 3360 if ((conn != NULL) && (hci_stack->le_connecting_request == LE_CONNECTING_IDLE)){ 3361 // remove entry 3362 btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn); 3363 btstack_memory_hci_connection_free( conn ); 3364 } | 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 --- 3348 unchanged lines hidden (view full) --- 3357 } 3358 3359 // free connection if cancelled by user (request == IDLE) 3360 if ((conn != NULL) && (hci_stack->le_connecting_request == LE_CONNECTING_IDLE)){ 3361 // remove entry 3362 btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn); 3363 btstack_memory_hci_connection_free( conn ); 3364 } |
3365 return; | 3365 3366 // emit GAP_SUBEVENT_LE_CONNECTION_COMPLETE for error case 3367 hci_emit_event(gap_event, sizeof(gap_event), 1); 3368 return; |
3366 } 3367#endif 3368 3369 // on success, both hosts receive connection complete event 3370 if (role == HCI_ROLE_MASTER){ 3371#ifdef ENABLE_LE_CENTRAL 3372 // if we're master, it was an outgoing connection 3373 // note: no hci_connection_t object exists yet for connect with whitelist --- 7432 unchanged lines hidden --- | 3369 } 3370#endif 3371 3372 // on success, both hosts receive connection complete event 3373 if (role == HCI_ROLE_MASTER){ 3374#ifdef ENABLE_LE_CENTRAL 3375 // if we're master, it was an outgoing connection 3376 // note: no hci_connection_t object exists yet for connect with whitelist --- 7432 unchanged lines hidden --- |