diff --git a/src/attrib-server.c b/src/attrib-server.c
index e01235f..56cd909 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
return 0;
}
-int attrib_db_del(uint16_t handle)
+int attrib_db_del(struct btd_adapter *adapter, uint16_t handle)
{
struct gatt_server *server;
struct attribute *a;
GSList *l;
guint h = handle;
- DBG("Deprecated function!");
-
- server = get_default_gatt_server();
- if (server == NULL)
+ l = g_slist_find_custom(servers, adapter, adapter_cmp);
+ if (l == NULL)
return -ENOENT;
+ server = l->data;
+
DBG("handle=0x%04x", handle);
l = g_slist_find_custom(server->database, GUINT_TO_POINTER(h),
diff --git a/src/attrib-server.h b/src/attrib-server.h
index fb7f285..becb3a8 100644
--- a/src/attrib-server.h
+++ b/src/attrib-server.h
int attrib_db_update(struct btd_adapter *adapter, uint16_t handle,
bt_uuid_t *uuid, const uint8_t *value,
int len, struct attribute **attr);
-int attrib_db_del(uint16_t handle);
+int attrib_db_del(struct btd_adapter *adapter, uint16_t handle);
int attrib_gap_set(struct btd_adapter *adapter, uint16_t uuid,
const uint8_t *value, int len);
uint32_t attrib_create_sdp(uint16_t handle, const char *name);