Diff between fb23d0273c55d4fa382c8d1e758cca0b75da12e4 and f694885825950278afaf92dd36ab6f7c89085983

Changed Files

File Additions Deletions Status
src/attrib-server.c +3 -1 modified

Full Patch

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 597a635..74a1c8d 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -1213,10 +1213,12 @@ struct attribute *attrib_db_add(uint16_t handle, bt_uuid_t *uuid, int read_reqs,
 				int write_reqs, const uint8_t *value, int len)
 {
 	struct attribute *a;
+	guint h = handle;
 
 	DBG("handle=0x%04x", handle);
 
-	/* FIXME: handle conflicts */
+	if (g_slist_find_custom(database, GUINT_TO_POINTER(h), handle_cmp))
+		return NULL;
 
 	a = g_malloc0(sizeof(struct attribute) + len);
 	a->handle = handle;