diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2011-11-07 11:09:13 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-11-14 20:50:58 +0200 |
commit | 2abb3498e8e6296c2564b410e226450a3419c54e (patch) | |
tree | ae39a874fcab0184b888b340dd624431bebec2ac /src/storage.c | |
parent | 13fc666eaa7ce57902405d4cc61c7b1ef58e90bf (diff) |
Add storage function to remove CCC of a device
Diffstat (limited to 'src/storage.c')
-rw-r--r-- | src/storage.c | 11 |
1 files changed, 11 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); +} |