Diff between 2003db38974eb073539e5947d9a809df7a2dd5b1 and 55fa5f1e94ffeb2c82b7ba54d958daba41a15a55

Changed Files

File Additions Deletions Status
android/bluetooth.c +14 -0 modified
android/bluetooth.h +2 -0 modified

Full Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index 644a556..c972cd5 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -3231,6 +3231,20 @@ bool bt_get_csrk(const bdaddr_t *addr, enum bt_csrk_type type, uint8_t key[16],
 	return true;
 }
 
+void bt_update_sign_counter(const bdaddr_t *addr, enum bt_csrk_type type)
+{
+	struct device *dev;
+
+	dev = find_device(addr);
+	if (!dev)
+		return;
+
+	if (type == LOCAL_CSRK)
+		dev->local_sign_cnt++;
+	else
+		dev->remote_sign_cnt++;
+}
+
 static uint8_t set_adapter_scan_mode(const void *buf, uint16_t len)
 {
 	const uint8_t *mode = buf;
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 9c88f62..1c14377 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -64,3 +64,5 @@ bool bt_read_device_rssi(const bdaddr_t *addr, bt_read_device_rssi_done cb,
 
 bool bt_get_csrk(const bdaddr_t *addr, enum bt_csrk_type type,
 					uint8_t key[16], uint32_t *sign_cnt);
+
+void bt_update_sign_counter(const bdaddr_t *addr, enum bt_csrk_type type);