sm.c (afbd946d92409b562f5d55c5ee8b9f95bf5fa15e) | sm.c (45d80b0845bec32e5f62dffbedd0ccd2b60d77b1) |
---|---|
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 --- 1277 unchanged lines hidden (view full) --- 1286 int matched_device_id = sm_address_resolution_test; 1287 address_resolution_mode_t mode = sm_address_resolution_mode; 1288 void * context = sm_address_resolution_context; 1289 1290 // reset context 1291 sm_address_resolution_mode = ADDRESS_RESOLUTION_IDLE; 1292 sm_address_resolution_context = NULL; 1293 sm_address_resolution_test = -1; | 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 --- 1277 unchanged lines hidden (view full) --- 1286 int matched_device_id = sm_address_resolution_test; 1287 address_resolution_mode_t mode = sm_address_resolution_mode; 1288 void * context = sm_address_resolution_context; 1289 1290 // reset context 1291 sm_address_resolution_mode = ADDRESS_RESOLUTION_IDLE; 1292 sm_address_resolution_context = NULL; 1293 sm_address_resolution_test = -1; |
1294 hci_con_handle_t con_handle = 0; | |
1295 | 1294 |
1295 hci_con_handle_t con_handle = HCI_CON_HANDLE_INVALID; |
|
1296 sm_connection_t * sm_connection; 1297 sm_key_t ltk; 1298 bool have_ltk; | 1296 sm_connection_t * sm_connection; 1297 sm_key_t ltk; 1298 bool have_ltk; |
1299 int authenticated; |
|
1299#ifdef ENABLE_LE_CENTRAL 1300 bool trigger_pairing; | 1300#ifdef ENABLE_LE_CENTRAL 1301 bool trigger_pairing; |
1301 int authenticated; | |
1302#endif | 1302#endif |
1303 |
|
1303 switch (mode){ 1304 case ADDRESS_RESOLUTION_GENERAL: 1305 break; 1306 case ADDRESS_RESOLUTION_FOR_CONNECTION: 1307 sm_connection = (sm_connection_t *) context; 1308 con_handle = sm_connection->sm_handle; 1309 1310 // have ltk -> start encryption / send security request --- 4245 unchanged lines hidden --- | 1304 switch (mode){ 1305 case ADDRESS_RESOLUTION_GENERAL: 1306 break; 1307 case ADDRESS_RESOLUTION_FOR_CONNECTION: 1308 sm_connection = (sm_connection_t *) context; 1309 con_handle = sm_connection->sm_handle; 1310 1311 // have ltk -> start encryption / send security request --- 4245 unchanged lines hidden --- |