aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2010-09-14 18:58:02 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2010-09-22 22:34:27 +0300
commit1b21625fb09a15df8c08b1474512dc912e44a8a5 (patch)
tree6329f2963989f6d6e28d4362689615149c831f28
parent8204b2e81877001dd54e94fb31bc27bddfa2e4bb (diff)
downloadbluez-1b21625fb09a15df8c08b1474512dc912e44a8a5.tar.gz
bluez-1b21625fb09a15df8c08b1474512dc912e44a8a5.tar.xz
bluez-1b21625fb09a15df8c08b1474512dc912e44a8a5.zip
Add missing response for handle value indication on attribute client
-rw-r--r--attrib/client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 9c676bd0..265625e0 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -278,7 +278,9 @@ static void events_handler(const uint8_t *pdu, uint16_t len,
struct characteristic *chr;
struct primary *prim;
GSList *lprim, *lchr;
+ uint8_t opdu[ATT_MAX_MTU];
guint handle = att_get_u16((uint16_t *) &pdu[1]);
+ uint16_t olen;
for (lprim = gatt->primary, prim = NULL, chr = NULL; lprim;
lprim = lprim->next) {
@@ -298,8 +300,11 @@ static void events_handler(const uint8_t *pdu, uint16_t len,
}
switch (pdu[0]) {
- case ATT_OP_HANDLE_NOTIFY:
case ATT_OP_HANDLE_IND:
+ olen = enc_confirmation(opdu, sizeof(opdu));
+ g_attrib_send(gatt->attrib, opdu[0], opdu, olen,
+ NULL, NULL, NULL);
+ case ATT_OP_HANDLE_NOTIFY:
if (characteristic_set_value(chr, pdu + 2, len - 2) < 0)
DBG("Can't change Characteristic %0x02x", handle);