From 1adae5a305152d7109dbf16bfabc43eb667c8fef Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Fri, 13 Sep 2024 13:15:36 +0100 Subject: [PATCH] Set stats_interval on receiving gateway configuration. Fixes #181. --- chirpstack-concentratord-2g4/src/handler/config.rs | 3 +++ chirpstack-concentratord-sx1301/src/handler/config.rs | 3 +++ chirpstack-concentratord-sx1302/src/handler/config.rs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/chirpstack-concentratord-2g4/src/handler/config.rs b/chirpstack-concentratord-2g4/src/handler/config.rs index 5bd8b20..d142282 100644 --- a/chirpstack-concentratord-2g4/src/handler/config.rs +++ b/chirpstack-concentratord-2g4/src/handler/config.rs @@ -41,6 +41,9 @@ pub fn update_configuration( } // set config + if let Some(stats_interval) = new_config.stats_interval { + config.concentratord.stats_interval = stats_interval.try_into()?; + } config.gateway.config_version.clone_from(&new_config.version); config.gateway.concentrator = concentrator; diff --git a/chirpstack-concentratord-sx1301/src/handler/config.rs b/chirpstack-concentratord-sx1301/src/handler/config.rs index f2ffee2..cff35d2 100644 --- a/chirpstack-concentratord-sx1301/src/handler/config.rs +++ b/chirpstack-concentratord-sx1301/src/handler/config.rs @@ -48,6 +48,9 @@ pub fn update_configuration( } // set config + if let Some(stats_interval) = new_config.stats_interval { + config.concentratord.stats_interval = stats_interval.try_into()?; + } config .gateway .config_version diff --git a/chirpstack-concentratord-sx1302/src/handler/config.rs b/chirpstack-concentratord-sx1302/src/handler/config.rs index 2108ddd..1e58519 100644 --- a/chirpstack-concentratord-sx1302/src/handler/config.rs +++ b/chirpstack-concentratord-sx1302/src/handler/config.rs @@ -48,6 +48,9 @@ pub fn update_configuration( } // set config + if let Some(stats_interval) = new_config.stats_interval { + config.concentratord.stats_interval = stats_interval.try_into()?; + } config .gateway .config_version