mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 09:06:02 +00:00
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 <benmmeadors@gmail.com>
This commit is contained in:
parent
e9d8a3d7f9
commit
3afe84c4f4
@ -1,6 +1,6 @@
|
|||||||
; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).
|
; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).
|
||||||
[portduino_base]
|
[portduino_base]
|
||||||
platform = https://github.com/meshtastic/platform-native.git#df71ed0040e9aad767a002829330965b78fc452a
|
platform = https://github.com/meshtastic/platform-native.git#e82ba1a19b6cd1dc55cbde29b33ea8dd0640014f
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
|
@ -23,7 +23,7 @@ class UdpMulticastThread : public concurrency::OSThread
|
|||||||
void start()
|
void start()
|
||||||
{
|
{
|
||||||
if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {
|
if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {
|
||||||
#if !defined(ARCH_PORTDUINO)
|
#ifndef ARCH_PORTDUINO
|
||||||
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
|
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
|
||||||
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
|
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
|
||||||
#else
|
#else
|
||||||
@ -59,7 +59,7 @@ class UdpMulticastThread : public concurrency::OSThread
|
|||||||
if (!mp || !udp) {
|
if (!mp || !udp) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if !defined(ARCH_PORTDUINO)
|
#ifndef ARCH_PORTDUINO
|
||||||
if (WiFi.status() != WL_CONNECTED) {
|
if (WiFi.status() != WL_CONNECTED) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user