szymon-czapracki commented on code in PR #1964:
URL: https://github.com/apache/mynewt-nimble/pull/1964#discussion_r2007591097


##########
apps/bttester/src/btp/btp_gatt.h:
##########
@@ -314,10 +314,11 @@ struct btp_gatt_change_database_cmd {
     uint8_t visibility;
 } __packed;
 
-#define BTP_GATT_SET_MULT_VALUE        0x20
-struct btp_gatt_set_mult_val_cmd {
+#define BTP_GATT_NOTIFY_MULTIPLE        0x21
+struct btp_gatt_notify_mult_val_cmd {
+    ble_addr_t addr;
     uint16_t count;
-    uint8_t data[0];
+    uint16_t data[0];

Review Comment:
   Done



##########
apps/bttester/src/btp_gatt.c:
##########
@@ -1871,44 +1871,25 @@ notify_multiple(uint16_t conn_handle, void *arg)
 }
 
 static uint8_t
-set_mult(const void *cmd, uint16_t cmd_len,
-         void *rsp, uint16_t *rsp_len)
+notify_mult(const void *cmd, uint16_t cmd_len,
+            void *rsp, uint16_t *rsp_len)
 {
-    const struct btp_gatt_set_mult_val_cmd *cp = cmd;
-    struct ble_gatt_notif tuples[16];
-    int i;
-    int rc = 0;
-    int data_idx = 0;
-    uint16_t data_len;
+    const struct btp_gatt_notify_mult_val_cmd *cp = cmd;
     struct notify_mult_cb_data cb_data;
+    int i;
 
-    for (i = 0; i < cp->count; i++) {
-        tuples[i].handle = get_le16(cp->data + data_idx);
-        data_idx += 2;
-        tuples[i].value = ble_hs_mbuf_att_pkt();
-        if (tuples[i].value == NULL) {
-            rc = ENOMEM;
-            goto done;
-        }
-
-        data_len = get_le16(cp->data + data_idx);
-        data_idx += 2;
-
-        os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len);
-        data_idx += data_len;
+    if (cp->count > sizeof(cb_data.handles)) {

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to