mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-23 18:27:27 +00:00
Merge remote-tracking branch 'origin/master' into 2.6
This commit is contained in:
@@ -644,6 +644,11 @@ bool PhoneAPI::handleToRadioPacket(meshtastic_MeshPacket &p)
|
||||
meshtastic_QueueStatus qs = router->getQueueStatus();
|
||||
service->sendQueueStatusToPhone(qs, 0, p.id);
|
||||
return false;
|
||||
} else if (p.decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP && isBroadcast(p.to) && p.hop_limit > 0) {
|
||||
sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, "Multi-hop traceroute to broadcast address is not allowed");
|
||||
meshtastic_QueueStatus qs = router->getQueueStatus();
|
||||
service->sendQueueStatusToPhone(qs, 0, p.id);
|
||||
return false;
|
||||
} else if (p.decoded.portnum == meshtastic_PortNum_POSITION_APP && lastPortNumToRadio[p.decoded.portnum] &&
|
||||
Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], FIVE_SECONDS_MS)) {
|
||||
LOG_WARN("Rate limit portnum %d", p.decoded.portnum);
|
||||
|
||||
@@ -51,6 +51,8 @@ template <class T, class U> int32_t APIServerPort<T, U>::runOnce()
|
||||
#else
|
||||
auto client = U::available();
|
||||
#endif
|
||||
#elif defined(ARCH_RP2040)
|
||||
auto client = U::accept();
|
||||
#else
|
||||
auto client = U::available();
|
||||
#endif
|
||||
@@ -78,4 +80,4 @@ template <class T, class U> int32_t APIServerPort<T, U>::runOnce()
|
||||
waitTime = 100;
|
||||
#endif
|
||||
return 100; // only check occasionally for incoming connections
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user