Skip to content

Commit 778876a

Browse files
lemreyrlubos
authored andcommitted
lib: at_monitor: assert when out of memory for notifications
Make sure this situation is well visible during development. Signed-off-by: Emanuele Di Santo <[email protected]>
1 parent 3e6909e commit 778876a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/at_monitor/at_monitor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ void at_monitor_dispatch(const char *notif)
7575

7676
at_notif = k_heap_alloc(&at_monitor_heap, sz_needed, K_NO_WAIT);
7777
if (!at_notif) {
78-
LOG_WRN("No heap space for incoming notification: %s",
79-
notif);
78+
LOG_WRN("No heap space for incoming notification: %s", notif);
79+
__ASSERT(at_notif, "No heap space for incoming notification: %s", notif);
8080
return;
8181
}
8282

0 commit comments

Comments
 (0)