fix: Ensure that all blocks execute on SIGUSR1. (closes #63)

This commit is contained in:
Utkarsh Verma 2024-03-19 06:53:49 +05:30
parent dea248b824
commit 8ebe985db8
No known key found for this signature in database
GPG Key ID: 7A4885A7162BDF20
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ static int trigger_event(block *const blocks, const unsigned short block_count,
static int refresh_callback(block *const blocks,
const unsigned short block_count) {
if (execute_blocks(blocks, block_count, 0) != 0) {
if (execute_blocks(blocks, block_count, NULL) != 0) {
return 1;
}

View File

@ -60,7 +60,7 @@ int timer_arm(timer *const timer) {
}
bool timer_must_run_block(const timer *const timer, const block *const block) {
if (timer->time == timer->reset_value) {
if (timer == NULL || timer->time == timer->reset_value) {
return true;
}