diff options
| author | JF <jf@codingfield.com> | 2022-01-07 16:31:01 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2022-01-07 16:31:01 (GMT) |
| commit | adc7909c9823c5cd9fc9888a84e84f9182b9088f (patch) | |
| tree | 778abfb7792fb7e58e3ec4408c9e56444f383e25 /src/components/ble/AlertNotificationService.cpp | |
| parent | cfef0131b7b1bb83c81db417c43d6d499594125f (diff) | |
| parent | 26ae828e393d28390c5ea718bec9d4c1a96435ac (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components/ble/AlertNotificationService.cpp')
| -rw-r--r-- | src/components/ble/AlertNotificationService.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp index 56fc595..0481912 100644 --- a/src/components/ble/AlertNotificationService.cpp +++ b/src/components/ble/AlertNotificationService.cpp @@ -1,8 +1,8 @@ -#include "AlertNotificationService.h" +#include "components/ble/AlertNotificationService.h" #include <hal/nrf_rtc.h> #include <cstring> #include <algorithm> -#include "NotificationManager.h" +#include "components/ble/NotificationManager.h" #include "systemtask/SystemTask.h" using namespace Pinetime::Controllers; @@ -53,8 +53,9 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle // Ignore notifications with empty message const auto packetLen = OS_MBUF_PKTLEN(ctxt->om); - if (packetLen <= headerSize) + if (packetLen <= headerSize) { return 0; + } size_t bufferSize = std::min(packetLen + stringTerminatorSize, maxBufferSize); auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize)); |
