mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-06 20:26:12 +00:00
* Bug fix: adding neighbor when path_mode != 0
This commit is contained in:
@@ -635,7 +635,7 @@ void MyMesh::onAdvertRecv(mesh::Packet *packet, const mesh::Identity &id, uint32
|
|||||||
mesh::Mesh::onAdvertRecv(packet, id, timestamp, app_data, app_data_len); // chain to super impl
|
mesh::Mesh::onAdvertRecv(packet, id, timestamp, app_data, app_data_len); // chain to super impl
|
||||||
|
|
||||||
// if this a zero hop advert (and not via 'Share'), add it to neighbours
|
// if this a zero hop advert (and not via 'Share'), add it to neighbours
|
||||||
if (packet->path_len == 0 && !isShare(packet)) {
|
if (packet->getPathHashCount() == 0 && !isShare(packet)) {
|
||||||
AdvertDataParser parser(app_data, app_data_len);
|
AdvertDataParser parser(app_data, app_data_len);
|
||||||
if (parser.isValid() && parser.getType() == ADV_TYPE_REPEATER) { // just keep neigbouring Repeaters
|
if (parser.isValid() && parser.getType() == ADV_TYPE_REPEATER) { // just keep neigbouring Repeaters
|
||||||
putNeighbour(id, timestamp, packet->getSNR());
|
putNeighbour(id, timestamp, packet->getSNR());
|
||||||
|
|||||||
Reference in New Issue
Block a user