mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-01 15:40:49 +00:00
DSR wip still kinda busted (rx packets not working - even for regular router)
This commit is contained in:
@@ -201,14 +201,16 @@ void Router::handleReceived(MeshPacket *p)
|
||||
void Router::perhapsHandleReceived(MeshPacket *p)
|
||||
{
|
||||
assert(radioConfig.has_preferences);
|
||||
bool inIgnore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
|
||||
bool ignore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
|
||||
|
||||
if (inIgnore)
|
||||
if (ignore)
|
||||
DEBUG_MSG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from);
|
||||
else if (ignore |= shouldFilterReceived(p))
|
||||
DEBUG_MSG("Incoming message was filtered 0x%x\n", p->from);
|
||||
|
||||
// Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might
|
||||
// cache/learn of the existence of nodes (i.e. FloodRouter) that they should not
|
||||
if (!inIgnore && !shouldFilterReceived(p))
|
||||
if (!ignore)
|
||||
handleReceived(p);
|
||||
|
||||
packetPool.release(p);
|
||||
|
||||
@@ -67,7 +67,7 @@ bool writecb(pb_ostream_t *stream, const uint8_t *buf, size_t count)
|
||||
|
||||
bool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count)
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
for (pb_size_t i = 0; i < count; i++)
|
||||
if (array[i] == n)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user