diff --git a/attrib/client.c b/attrib/client.c
index 54bdc79..590f33b 100644
--- a/attrib/client.c
+++ b/attrib/client.c
}
}
-int attrib_client_register(struct btd_device *device, int psm)
+int attrib_client_register(struct btd_device *device, int psm, GSList *primaries)
{
struct btd_adapter *adapter = device_get_adapter(device);
const char *path = device_get_path(device);
struct gatt_service *gatt;
- GSList *primaries = btd_device_get_primaries(device);
bdaddr_t sba, dba;
adapter_get_address(adapter, &sba);
diff --git a/attrib/client.h b/attrib/client.h
index 50e2b5f..2bee84c 100644
--- a/attrib/client.h
+++ b/attrib/client.h
int attrib_client_init(DBusConnection *conn);
void attrib_client_exit(void);
-int attrib_client_register(struct btd_device *device, int psm);
+int attrib_client_register(struct btd_device *device, int psm, GSList *primaries);
void attrib_client_unregister(struct btd_device *device);
diff --git a/src/adapter.c b/src/adapter.c
index 031e141..26a8860 100644
--- a/src/adapter.c
+++ b/src/adapter.c
#include "storage.h"
#include "attrib-server.h"
#include "att.h"
+#include "attrib/client.h"
/* Flags Descriptions */
#define EIR_LIM_DISC 0x01 /* LE Limited Discoverable Mode */
device_add_primary(device, prim);
}
+ /* FIXME: Need the correct psm */
+ attrib_client_register(device, -1, services);
+
device_probe_drivers(device, uuids);
g_slist_free(services);
diff --git a/src/device.c b/src/device.c
index 771a908..9a3202f 100644
--- a/src/device.c
+++ b/src/device.c
#include "sdp-xml.h"
#include "storage.h"
#include "btio.h"
+#include "attrib/client.h"
#define DISCONNECT_TIMER 2
#define DISCOVERY_TIMER 2
g_slist_free(device->drivers);
device->drivers = NULL;
+ attrib_client_unregister(device);
+
btd_device_unref(device);
}