summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAvamander <avamander@gmail.com>2021-11-28 19:13:03 +0200
committerAvamander <avamander@gmail.com>2021-12-04 22:03:40 +0200
commit900598a7eeff1a84ccf7d0d7c94ac28a780299d4 (patch)
tree37f80f54b27bf458402f4df84eb58f72365d7d95 /src/components
parent657dc3a9ba21039cc9abd3c40c68aa3e810bd074 (diff)
Removed versioning because it's not necessary
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ble/weather/WeatherService.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp
index bbaa21f0..135f64dd 100644
--- a/src/components/ble/weather/WeatherService.cpp
+++ b/src/components/ble/weather/WeatherService.cpp
@@ -48,18 +48,11 @@ namespace Pinetime {
}
// Decode
QCBORDecodeContext decodeContext;
- UsefulBufC encodedCbor;
- // TODO: Check, uninit fine?
+ UsefulBufC encodedCbor = {ctxt->om, OS_MBUF_PKTLEN(ctxt->om)};
QCBORDecode_Init(&decodeContext, encodedCbor, QCBOR_DECODE_MODE_NORMAL);
QCBORDecode_EnterMap(&decodeContext, nullptr);
// Always encodes to the smallest number of bytes based on the value
- int64_t tmpVersion = 0;
- QCBORDecode_GetInt64InMapSZ(&decodeContext, "Version", &tmpVersion);
- if (tmpVersion != 1) {
- // TODO: Return better error?
- return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
- }
int64_t tmpTimestamp = 0;
QCBORDecode_GetInt64InMapSZ(&decodeContext, "Timestamp", &tmpTimestamp);
int64_t tmpExpires = 0;