Diff between e3c94accd0bfdccf67ee29d063c6a97bc289c946 and f22c60eab61f73a798039e6227e47126ca9c5c67

Changed Files

File Additions Deletions Status
src/attrib-server.c +16 -0 modified

Full Patch

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 8464d2a..8010f1b 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -890,6 +890,8 @@ static void channel_handler(const uint8_t *ipdu, uint16_t len,
 		length = find_by_type(start, end, &uuid, value, vlen,
 							opdu, channel->mtu);
 		break;
+	case ATT_OP_HANDLE_CNF:
+		return;
 	case ATT_OP_READ_MULTI_REQ:
 	case ATT_OP_PREP_WRITE_REQ:
 	case ATT_OP_EXEC_WRITE_REQ:
@@ -992,6 +994,20 @@ static void attrib_notify_clients(struct attribute *attr)
 			g_attrib_send(channel->attrib, 0, pdu[0], pdu, len,
 							NULL, NULL, NULL);
 		}
+
+		/* Indication */
+		if (g_slist_find_custom(channel->indicate,
+					GUINT_TO_POINTER(handle), handle_cmp)) {
+			uint8_t pdu[ATT_MAX_MTU];
+			uint16_t len;
+
+			len = enc_indication(attr, pdu, channel->mtu);
+			if (len == 0)
+				return;
+
+			g_attrib_send(channel->attrib, 0, pdu[0], pdu, len,
+							NULL, NULL, NULL);
+		}
 	}
 }