return false;
}
+#ifndef TIZEN_CERTIFICATE
att_id = bt_att_send(notify_data->client->att, BT_ATT_OP_WRITE_REQ,
pdu, sizeof(pdu), callback,
notify_data_ref(notify_data),
notify_data_unref);
+#else
+ /* GAP/SEC/SEM/BV-56-C, GAP/SEC/SEM/BV-59-C
+ PTS expects to recieve the sperated value for notify and indicate
+ So seperate the value and send it
+ */
+ bool notify = false;
+ bool indicate = false;
+
+ att_id = 0;
+
+ if (pdu[2] & 0x01)
+ notify = true;
+
+ if (pdu[2] & 0x02)
+ indicate = true;
+
+ if (notify == true) {
+ pdu[2] = 0x01;
+
+ att_id = bt_att_send(notify_data->client->att, BT_ATT_OP_WRITE_REQ,
+ pdu, sizeof(pdu), callback,
+ notify_data_ref(notify_data),
+ notify_data_unref);
+ }
+
+ if (indicate == true) {
+ pdu[2] = 0x02;
+
+ att_id = bt_att_send(notify_data->client->att, BT_ATT_OP_WRITE_REQ,
+ pdu, sizeof(pdu), callback,
+ NULL,
+ NULL);
+ }
+#endif
+
notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
return !!att_id;
{
struct notify_data *notify_data = user_data;
+#ifdef TIZEN_CERTIFICATE
+ if (notify_data == NULL)
+ return;
+#endif
+
assert(notify_data->chrc->ccc_write_id);
notify_data->chrc->ccc_write_id = 0;