summaryrefslogtreecommitdiff
path: root/src/storage.c
diff options
context:
space:
mode:
authorFrédéric Danis <frederic.danis@linux.intel.com>2012-12-13 21:39:26 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2012-12-13 22:58:30 +0200
commitd9dbd8c15407470531fd3df37f9e9153000012f3 (patch)
tree7b6ca3f90fc14f9a4d89efdbbac60de7094fb8ee /src/storage.c
parent3d8a6eb1681686222b33b46f71d8e2d755fb27e8 (diff)
downloadbluez-d9dbd8c15407470531fd3df37f9e9153000012f3.tar.gz
device: Store SDP records in new storage
Store SDP records in device file located in cache directory. Update attributes file with primary services retrieved from attributes entry in SDP records. Remove store_record() from storage.[ch].
Diffstat (limited to 'src/storage.c')
-rw-r--r--src/storage.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/storage.c b/src/storage.c
index d4516ed5d..180946f61 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -245,39 +245,6 @@ ssize_t read_pin_code(const bdaddr_t *local, const bdaddr_t *peer, char *pin)
return len;
}
-int store_record(const gchar *src, const gchar *dst, uint8_t dst_type,
- sdp_record_t *rec)
-{
- char filename[PATH_MAX + 1], key[30];
- sdp_buf_t buf;
- int err, size, i;
- char *str;
-
- create_name(filename, PATH_MAX, STORAGEDIR, src, "sdp");
-
- create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
- snprintf(key, sizeof(key), "%17s#%hhu#%08X", dst, dst_type,
- rec->handle);
-
- if (sdp_gen_record_pdu(rec, &buf) < 0)
- return -1;
-
- size = buf.data_size;
-
- str = g_malloc0(size*2+1);
-
- for (i = 0; i < size; i++)
- sprintf(str + (i * 2), "%02X", buf.data[i]);
-
- err = textfile_put(filename, key, str);
-
- free(buf.data);
- g_free(str);
-
- return err;
-}
-
sdp_record_t *record_from_string(const gchar *str)
{
sdp_record_t *rec;