att_server.c (7c959318bbec49704075e644d0c341510ff9689e) | att_server.c (70a390c7e09251d39a245e7c114302be0c95b94b) |
---|---|
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 --- 160 unchanged lines hidden (view full) --- 169 case HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE: 170 // check handle 171 if (att_connection.con_handle != little_endian_read_16(packet, 3)) break; 172 att_connection.encryption_key_size = sm_encryption_key_size(att_connection.con_handle); 173 att_connection.authenticated = sm_authenticated(att_connection.con_handle); 174 break; 175 176 case HCI_EVENT_DISCONNECTION_COMPLETE: | 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 --- 160 unchanged lines hidden (view full) --- 169 case HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE: 170 // check handle 171 if (att_connection.con_handle != little_endian_read_16(packet, 3)) break; 172 att_connection.encryption_key_size = sm_encryption_key_size(att_connection.con_handle); 173 att_connection.authenticated = sm_authenticated(att_connection.con_handle); 174 break; 175 176 case HCI_EVENT_DISCONNECTION_COMPLETE: |
177 // check handle 178 if (att_connection.con_handle != hci_event_disconnection_complete_get_connection_handle(packet)) break; |
|
177 att_clear_transaction_queue(&att_connection); 178 att_connection.con_handle = 0; 179 att_handle_value_indication_handle = 0; // reset error state | 179 att_clear_transaction_queue(&att_connection); 180 att_connection.con_handle = 0; 181 att_handle_value_indication_handle = 0; // reset error state |
180 // restart advertising if we have been connected before 181 // -> avoid sending advertise enable a second time before command complete was received | |
182 att_server_state = ATT_SERVER_IDLE; 183 break; 184 185 case SM_EVENT_IDENTITY_RESOLVING_STARTED: 186 log_info("SM_EVENT_IDENTITY_RESOLVING_STARTED"); 187 att_ir_lookup_active = 1; 188 break; 189 case SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED: --- 279 unchanged lines hidden --- | 182 att_server_state = ATT_SERVER_IDLE; 183 break; 184 185 case SM_EVENT_IDENTITY_RESOLVING_STARTED: 186 log_info("SM_EVENT_IDENTITY_RESOLVING_STARTED"); 187 att_ir_lookup_active = 1; 188 break; 189 case SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED: --- 279 unchanged lines hidden --- |