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:
James Rich committed 2026-09-16 09:27:15 -05:00
1 parent 5659e8893b
commit 2d518420aa
1 file changed
+3 -2
+3 -2
View File
@@ -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)