From b71e12c5e51bc6f57ffa23c35f2310605b7c78c1 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 31 Aug 2024 15:04:35 -0500 Subject: [PATCH] Phone admin work (#4599) * Don't throw an error on the sessionkey admin tag * Throw an error on packet sent to 0 --- src/mesh/PhoneAPI.cpp | 3 +++ src/mesh/Router.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mesh/PhoneAPI.cpp b/src/mesh/PhoneAPI.cpp index 0a9bb5b10..0ca89b1ef 100644 --- a/src/mesh/PhoneAPI.cpp +++ b/src/mesh/PhoneAPI.cpp @@ -259,6 +259,9 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag; fromRadioScratch.config.payload_variant.security = config.security; break; + case meshtastic_Config_sessionkey_tag: + fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag; + break; default: LOG_ERROR("Unknown config type %d\n", config_state); } diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index 804761f4e..d8e578db1 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -165,6 +165,9 @@ meshtastic_QueueStatus Router::getQueueStatus() ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src) { + if (p->to == 0) { + LOG_ERROR("Packet received with to: of 0!\n"); + } // No need to deliver externally if the destination is the local node if (p->to == nodeDB->getNodeNum()) { printPacket("Enqueued local", p);