aboutsummaryrefslogtreecommitdiffstats
path: root/src/storage.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-01-18 13:27:16 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-01-18 13:27:16 +0200
commit4548e3a6b21bbc185dd8284e128751ce87d108ae (patch)
treef8623ea5c6f55c2603fdd2017f9c8337c133a080 /src/storage.c
parent26a2456f1f3a075b1a4b94454dcc6f13274b7c03 (diff)
downloadbluez-4548e3a6b21bbc185dd8284e128751ce87d108ae.tar.gz
bluez-4548e3a6b21bbc185dd8284e128751ce87d108ae.tar.xz
bluez-4548e3a6b21bbc185dd8284e128751ce87d108ae.zip
storage: Add variable-length EIR support to write_remote_eir
Diffstat (limited to 'src/storage.c')
-rw-r--r--src/storage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/storage.c b/src/storage.c
index a47720a4..248e3971 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -359,13 +359,14 @@ int read_device_name(const char *src, const char *dst, char *name)
return 0;
}
-int write_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data)
+int write_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data,
+ uint8_t data_len)
{
char filename[PATH_MAX + 1], addr[18], str[481];
int i;
memset(str, 0, sizeof(str));
- for (i = 0; i < HCI_MAX_EIR_LENGTH; i++)
+ for (i = 0; i < data_len; i++)
sprintf(str + (i * 2), "%2.2X", data[i]);
create_filename(filename, PATH_MAX, local, "eir");