aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/storage.c11
-rw-r--r--src/storage.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/storage.c b/src/storage.c
index 7471b0f2..e4ad4abc 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -1305,3 +1305,14 @@ int write_device_ccc(bdaddr_t *local, bdaddr_t *peer, uint16_t handle,
return textfile_put(filename, key, config);
}
+
+void delete_device_ccc(bdaddr_t *local, bdaddr_t *peer)
+{
+ char filename[PATH_MAX + 1], addr[18];
+
+ ba2str(peer, addr);
+
+ /* Deleting all CCC values of a given address */
+ create_filename(filename, PATH_MAX, local, "ccc");
+ delete_by_pattern(filename, addr);
+}
diff --git a/src/storage.h b/src/storage.h
index 1cb36379..51259f60 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -87,6 +87,7 @@ int read_device_ccc(bdaddr_t *local, bdaddr_t *peer, uint16_t handle,
uint16_t *value);
int write_device_ccc(bdaddr_t *local, bdaddr_t *peer, uint16_t handle,
uint16_t value);
+void delete_device_ccc(bdaddr_t *local, bdaddr_t *peer);
#define PNP_UUID "00001200-0000-1000-8000-00805f9b34fb"