From 40a70222c8dc8a3a4c7f47e0506f8e337c8ed5f9 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 29 Mar 2026 10:53:43 -0400 Subject: [PATCH] don't put chan_name in log_rx if we don't know it --- pyproject.toml | 2 +- src/meshcore/meshcore_parser.py | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f149852..a2292b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "2.3.4" +version = "2.3.5" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, { name="Alex Wolden", email="awolden@gmail.com" }, diff --git a/src/meshcore/meshcore_parser.py b/src/meshcore/meshcore_parser.py index 50b4bb6..2139663 100644 --- a/src/meshcore/meshcore_parser.py +++ b/src/meshcore/meshcore_parser.py @@ -108,17 +108,14 @@ class MeshcorePacketParser: channel = c break - chan_name = "" - - if channel is None : - chan_name = chan_hash - else: - chan_name = channel["channel_name"] - log_data["chan_hash"] = chan_hash log_data["cipher_mac"] = cipher_mac.hex() log_data["crypted"] = msg.hex() - log_data["chan_name"] = chan_name + + chan_name = "" + if not channel is None : + chan_name = channel["channel_name"] + log_data["chan_name"] = chan_name if not channel is None and self.decrypt_channels: