Diff between fccfc3b5e6c4fe94d1196d61062b35e878f84899 and f21dfebe76b3eb856a01367d6be0e41683bb2cba

Changed Files

File Additions Deletions Status
profiles/input/hog-lib.c +6 -0 modified

Full Patch

diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index 1f132aa..6ac14e4 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -336,6 +336,9 @@ static void report_ccc_written_cb(guint8 status, const guint8 *pdu,
 		return;
 	}
 
+	if (report->notifyid)
+		return;
+
 	report->notifyid = g_attrib_register(hog->attrib,
 					ATT_OP_HANDLE_NOTIFY,
 					report->value_handle,
@@ -1697,6 +1700,9 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt)
 	for (l = hog->reports; l; l = l->next) {
 		struct report *r = l->data;
 
+		if (r->notifyid)
+			continue;
+
 		r->notifyid = g_attrib_register(hog->attrib,
 					ATT_OP_HANDLE_NOTIFY,
 					r->value_handle,