Skip to content

Commit

Permalink
Merge pull request #73 from adamfowleruk/feature-52
Browse files Browse the repository at this point in the history
Fixes #52. Clears newly allocated payload temporary copy once used.
Signed-off-by: Adam Fowler <adam@adamfowler.org>
  • Loading branch information
adamfowleruk authored Apr 26, 2021
2 parents 95dd012 + 3dcbaaa commit d0a40c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion herald/src/ble/zephyr/concrete_ble_transmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ namespace zephyrinternal {
newvalue[i] = (char)payload->at(i);
}
value = newvalue;
return bt_gatt_attr_read(conn, attr, buf, len, offset, value,
auto res = bt_gatt_attr_read(conn, attr, buf, len, offset, value,
payload->size());
delete newvalue;
return res;
// } else {
// value = "venue value"; // TODO replace with the use of PDS
}
Expand Down

0 comments on commit d0a40c2

Please sign in to comment.