Skip to content

Commit 6a079e6

Browse files
committed
11_sensor_ipc: return on callback error
1 parent 448a366 commit 6a079e6

File tree

1 file changed

+1
-0
lines changed
  • examples/tutorials/thread_network/11_sensor_ipc

1 file changed

+1
-0
lines changed

examples/tutorials/thread_network/11_sensor_ipc/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ static void sensor_ipc_callback(int pid, int len, int buf,
1515
if (len < ((int) sizeof(current_temperature))) {
1616
// We do not inform the caller and simply return. We do print a log message:
1717
puts("[thread-sensor] ERROR: sensor IPC invoked with too small buffer.\r\n");
18+
return;
1819
}
1920

2021
// The buffer is large enough, copy the current temperature into it:

0 commit comments

Comments
 (0)