Diff between 4e8ab0f65724d74505c2f0234f27596879f04202 and 7ffe79447f11fad70c7193f05a571634c9b53963

Changed Files

File Additions Deletions Status
android/gatt.c +10 -7 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index 84fba64..f550ed4 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1017,6 +1017,12 @@ static void send_exchange_mtu_request(struct gatt_device *device)
 		device_unref(device);
 }
 
+static void ignore_confirmation_cb(guint8 status, const guint8 *pdu,
+					guint16 len, gpointer user_data)
+{
+	/* Ignored. */
+}
+
 static void notify_att_range_change(struct gatt_device *dev,
 							struct att_range *range)
 {
@@ -1025,6 +1031,7 @@ static void notify_att_range_change(struct gatt_device *dev,
 	uint16_t ccc;
 	uint8_t *pdu;
 	size_t mtu;
+	GAttribResultFunc confirmation_cb = NULL;
 
 	handle = gatt_db_attribute_get_handle(service_changed_attrib);
 	if (!handle)
@@ -1044,6 +1051,7 @@ static void notify_att_range_change(struct gatt_device *dev,
 	case 0x0002:
 		length = enc_indication(handle, (uint8_t *) range,
 						sizeof(*range), pdu, mtu);
+		confirmation_cb = ignore_confirmation_cb;
 		break;
 	default:
 		/* 0xfff4 reserved for future use */
@@ -1051,7 +1059,8 @@ static void notify_att_range_change(struct gatt_device *dev,
 	}
 
 	if (length)
-		g_attrib_send(dev->attrib, 0, pdu, length, NULL, NULL, NULL);
+		g_attrib_send(dev->attrib, 0, pdu, length,
+						confirmation_cb, NULL, NULL);
 }
 
 static struct app_connection *create_connection(struct gatt_device *device,
@@ -5439,12 +5448,6 @@ failed:
 				HAL_OP_GATT_SERVER_DELETE_SERVICE, status);
 }
 
-static void ignore_confirmation_cb(guint8 status, const guint8 *pdu,
-						guint16 len, gpointer user_data)
-{
-	/* Ignored. */
-}
-
 static void handle_server_send_indication(const void *buf, uint16_t len)
 {
 	const struct hal_cmd_gatt_server_send_indication *cmd = buf;