mirror of
https://github.com/meshtastic/firmware.git
synced 2026-09-23 23:05:35 -04:00
Brace the nRF52 CCCD callback so it compiles
everSubscribed was updated outside the if that declares the pointer, which is
out of scope there, so 783e3a497 broke the rak4631_blemesh build and every nRF52
mesh env with it. The ESP32 copy in that same commit braces both statements; this
is the nRF52 half catching up.
rak4631_blemesh builds again: flash 92.2%, RAM 41.1%.
This commit is contained in:
1 parent
5659e8893b
commit
2d518420aa
1 file changed
+3
-2
@@ -117,9 +117,10 @@ void onCccd(uint16_t conn, BLECharacteristic *, uint16_t value)
|
||||
const bool subscribed = (value & 0x0001) != 0;
|
||||
{
|
||||
concurrency::LockGuard guard(&lock);
|
||||
if (Link *l = addLink(conn))
|
||||
if (Link *l = addLink(conn)) {
|
||||
l->subscribed = subscribed;
|
||||
l->everSubscribed |= subscribed;
|
||||
l->everSubscribed |= subscribed;
|
||||
}
|
||||
}
|
||||
LOG_INFO("BLE GATT mesh: conn %u %s (chunk %u)", conn, subscribed ? "subscribed" : "unsubscribed", chunkFor(conn));
|
||||
if (bleGattMeshHandler)
|
||||
|
||||
Reference in new issue
Block a user