hci.c (287379cc24274f3540d616d60b21083e8898a42f) hci.c (e8ad470ff8f36d7e0f412914df7518a43899ee17)
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

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

394}
395
396void gap_store_link_key_for_bd_addr(bd_addr_t addr, link_key_t link_key, link_key_type_t type){
397 if (!hci_stack->link_key_db) return;
398 log_info("gap_store_link_key_for_bd_addr: %s, type %u", bd_addr_to_str(addr), type);
399 hci_stack->link_key_db->put_link_key(addr, link_key, type);
400}
401
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

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

394}
395
396void gap_store_link_key_for_bd_addr(bd_addr_t addr, link_key_t link_key, link_key_type_t type){
397 if (!hci_stack->link_key_db) return;
398 log_info("gap_store_link_key_for_bd_addr: %s, type %u", bd_addr_to_str(addr), type);
399 hci_stack->link_key_db->put_link_key(addr, link_key, type);
400}
401
402bool gap_get_link_key_for_bd_addr(bd_addr_t addr, link_key_t link_key, link_key_type_t * type){
403 if (!hci_stack->link_key_db) return false;
404 log_info("gap_store_link_key_for_bd_addr: %s, type %u", bd_addr_to_str(addr), type);
405 return hci_stack->link_key_db->get_link_key(addr, link_key, type) != 0;
406}
407
402void gap_delete_all_link_keys(void){
403 bd_addr_t addr;
404 link_key_t link_key;
405 link_key_type_t type;
406 btstack_link_key_iterator_t it;
407 int ok = gap_link_key_iterator_init(&it);
408 if (!ok) {
409 log_error("could not initialize iterator");

--- 5685 unchanged lines hidden ---
408void gap_delete_all_link_keys(void){
409 bd_addr_t addr;
410 link_key_t link_key;
411 link_key_type_t type;
412 btstack_link_key_iterator_t it;
413 int ok = gap_link_key_iterator_init(&it);
414 if (!ok) {
415 log_error("could not initialize iterator");

--- 5685 unchanged lines hidden ---