Skip to content

Commit

Permalink
11_sensor_ipc: return on callback error
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc committed Dec 10, 2024
1 parent 448a366 commit 6a079e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/tutorials/thread_network/11_sensor_ipc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ static void sensor_ipc_callback(int pid, int len, int buf,
if (len < ((int) sizeof(current_temperature))) {
// We do not inform the caller and simply return. We do print a log message:
puts("[thread-sensor] ERROR: sensor IPC invoked with too small buffer.\r\n");
return;
}

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

0 comments on commit 6a079e6

Please sign in to comment.