aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorSheldon Demario <sheldon.demario@openbossa.org>2010-12-22 17:01:13 -0500
committerJohan Hedberg <johan.hedberg@nokia.com>2010-12-23 00:34:04 +0200
commitd3cb258b9b9af0dcacfba0e6aa0db3f280554fb0 (patch)
tree65e5e13b0e9520a4eecfeec0ee981512aa9ac2a0 /attrib/client.c
parent50fb53c4a7520e210244d909be9ef1accf5cfdfe (diff)
downloadbluez-d3cb258b9b9af0dcacfba0e6aa0db3f280554fb0.tar.gz
bluez-d3cb258b9b9af0dcacfba0e6aa0db3f280554fb0.tar.xz
bluez-d3cb258b9b9af0dcacfba0e6aa0db3f280554fb0.zip
Move primary service storage to device.c
Discover All Primary Services has beed moved to device.c in order to follow a similar approach of BR/EDR service records.
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 69e4fb8b..00d0bbc9 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -1086,35 +1086,6 @@ static void load_attribute_data(char *key, char *value, void *data)
chr->format = attr_data_from_string(value + MAX_LEN_UUID_STR);
}
-static char *primary_list_to_string(GSList *primary_list)
-{
- GString *services;
- GSList *l;
-
- services = g_string_new(NULL);
-
- for (l = primary_list; l; l = l->next) {
- struct primary *primary = l->data;
- uuid_t *uuid128;
- char service[64];
- char uuidstr[MAX_LEN_UUID_STR];
-
- memset(service, 0, sizeof(service));
-
- uuid128 = sdp_uuid_to_uuid128(&primary->uuid);
- sdp_uuid2strn(uuid128, uuidstr, MAX_LEN_UUID_STR);
-
- bt_free(uuid128);
-
- snprintf(service, sizeof(service), "%04X#%04X#%s ",
- primary->start, primary->end, uuidstr);
-
- services = g_string_append(services, service);
- }
-
- return g_string_free(services, FALSE);
-}
-
static GSList *string_to_primary_list(struct gatt_service *gatt,
const char *str)
{
@@ -1158,17 +1129,6 @@ static GSList *string_to_primary_list(struct gatt_service *gatt,
return l;
}
-static void store_primary_services(struct gatt_service *gatt)
-{
- char *services;
-
- services = primary_list_to_string(gatt->primary);
-
- write_device_services(&gatt->sba, &gatt->dba, services);
-
- g_free(services);
-}
-
static gboolean load_primary_services(struct gatt_service *gatt)
{
GSList *primary_list;
@@ -1225,7 +1185,6 @@ static void primary_cb(guint8 status, const guint8 *pdu, guint16 plen,
if (gatt->primary == NULL)
goto done;
- store_primary_services(gatt);
register_primary(gatt);
g_slist_foreach(gatt->primary, discover_all_char, gatt);