From 6ab71ca3162c4a87e2d569c2d48639b46fcdbcab Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sat, 15 Aug 2020 00:25:00 +0200 Subject: [PATCH] add: more debugging --- CMakeLists.txt | 2 +- src/models/relay.c | 1 + src/status.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c96106..874188e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(core - VERSION 0.2.9 + VERSION 0.2.10 LANGUAGES C) add_executable(core src/main.c) diff --git a/src/models/relay.c b/src/models/relay.c index 2d8ed44..b0ed160 100644 --- a/src/models/relay.c +++ b/src/models/relay.c @@ -157,6 +157,7 @@ relay_save(relay_t *relay) } } + LOGGER_DEBUG("rebuilding relay_schedule junction\n"); junction_relay_schedule_remove_for_relay(relay->id); for(int i = 0; i < 7; ++i) { diff --git a/src/status.c b/src/status.c index d6ec631..ec171b7 100644 --- a/src/status.c +++ b/src/status.c @@ -35,6 +35,7 @@ status_reload_entry(int relay_id) relays[i]->is_on = is_on_backup; relay_status_list_json_str = NULL; relay_status_list_json_str_len = 0; + cache_invalidate_relay(relay_id); } } @@ -53,6 +54,8 @@ status_update_entry(int relay_id, int is_on) relays[i]->is_on = is_on; relay_status_list_json_str = NULL; relay_status_list_json_str_len = 0; + + cache_invalidate_relay(relay_id); } }