diff --git a/android/bluetooth.c b/android/bluetooth.c
index 946e932..41225d6 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
}
}
+static void load_ltk_complete(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ if (status == MGMT_STATUS_SUCCESS)
+ return;
+
+ info("Failed to load LTKs: %s (0x%02x)", mgmt_errstr(status), status);
+}
+
static void load_ltks(GSList *ltks)
{
struct mgmt_cp_load_long_term_keys *cp;
memcpy(ltk, ltks->data, sizeof(*ltk));
if (mgmt_send(mgmt_if, MGMT_OP_LOAD_LONG_TERM_KEYS, adapter.index,
- cp_size, cp, NULL, NULL, NULL) == 0)
+ cp_size, cp, load_ltk_complete, NULL, NULL) == 0)
error("Failed to load LTKs");
g_free(cp);
}
+static void load_irk_complete(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ if (status == MGMT_STATUS_SUCCESS)
+ return;
+
+ info("Failed to load IRKs: %s (0x%02x)", mgmt_errstr(status), status);
+}
+
static void load_irks(GSList *irks)
{
struct mgmt_cp_load_irks *cp;
memcpy(irk, irks->data, sizeof(*irk));
if (mgmt_send(mgmt_if, MGMT_OP_LOAD_IRKS, adapter.index, cp_size, cp,
- NULL, NULL, NULL) == 0)
+ load_irk_complete, NULL, NULL) == 0)
error("Failed to load IRKs");
g_free(cp);