From 3afe84c4f4ca3e01faff4e503eae887173c989a4 Mon Sep 17 00:00:00 2001 From: Jorropo Date: Tue, 25 Mar 2025 01:30:47 +0100 Subject: [PATCH] linux-native: allow multiple processes to all bind to the same multicast 2tuple (#6391) * cleanup UdpMulticastThread.h preprocessor rules a tiny bit * bump platform-native to allow for multiple multicast listeners on the same machine --------- Co-authored-by: Ben Meadors --- arch/portduino/portduino.ini | 2 +- src/mesh/udp/UdpMulticastThread.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 734a4f91e..55234914f 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -1,6 +1,6 @@ ; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated). [portduino_base] -platform = https://github.com/meshtastic/platform-native.git#df71ed0040e9aad767a002829330965b78fc452a +platform = https://github.com/meshtastic/platform-native.git#e82ba1a19b6cd1dc55cbde29b33ea8dd0640014f framework = arduino build_src_filter = diff --git a/src/mesh/udp/UdpMulticastThread.h b/src/mesh/udp/UdpMulticastThread.h index 7067cced9..88824dc4d 100644 --- a/src/mesh/udp/UdpMulticastThread.h +++ b/src/mesh/udp/UdpMulticastThread.h @@ -23,7 +23,7 @@ class UdpMulticastThread : public concurrency::OSThread void start() { if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) { -#if !defined(ARCH_PORTDUINO) +#ifndef ARCH_PORTDUINO // FIXME(PORTDUINO): arduino lacks IPAddress::toString() LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str()); #else @@ -59,7 +59,7 @@ class UdpMulticastThread : public concurrency::OSThread if (!mp || !udp) { return false; } -#if !defined(ARCH_PORTDUINO) +#ifndef ARCH_PORTDUINO if (WiFi.status() != WL_CONNECTED) { return false; }