mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-01 21:08:19 +00:00
sync with vanilla dev
This commit is contained in:
@@ -635,7 +635,10 @@ uint32_t RepeaterMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
return computeAdaptiveDirectDelay(packet);
|
||||
}
|
||||
|
||||
bool RepeaterMesh::filterRecvFloodPacket(mesh::Packet* pkt) {
|
||||
mesh::DispatcherAction RepeaterMesh::onRecvPacket(mesh::Packet* pkt) {
|
||||
// Determine the request packet's region so sendFloodReply() can echo the same
|
||||
// scope. Runs for every packet (not just floods) so recv_pkt_region is cleared
|
||||
// for direct packets instead of inheriting the last flood's region.
|
||||
if (pkt->getRouteType() == ROUTE_TYPE_TRANSPORT_FLOOD) {
|
||||
recv_pkt_region = region_map.findMatch(pkt, REGION_DENY_FLOOD);
|
||||
} else if (pkt->getRouteType() == ROUTE_TYPE_FLOOD) {
|
||||
@@ -647,7 +650,7 @@ bool RepeaterMesh::filterRecvFloodPacket(mesh::Packet* pkt) {
|
||||
} else {
|
||||
recv_pkt_region = nullptr;
|
||||
}
|
||||
return false;
|
||||
return Mesh::onRecvPacket(pkt);
|
||||
}
|
||||
|
||||
void RepeaterMesh::onAnonDataRecv(mesh::Packet* packet, const uint8_t* secret, const mesh::Identity& sender, uint8_t* data, size_t len) {
|
||||
|
||||
@@ -179,7 +179,7 @@ protected:
|
||||
return _prefs.multi_acks;
|
||||
}
|
||||
|
||||
bool filterRecvFloodPacket(mesh::Packet* pkt) override;
|
||||
mesh::DispatcherAction onRecvPacket(mesh::Packet* pkt) override;
|
||||
|
||||
void onAnonDataRecv(mesh::Packet* packet, const uint8_t* secret, const mesh::Identity& sender, uint8_t* data, size_t len) override;
|
||||
int searchPeersByHash(const uint8_t* hash) override;
|
||||
|
||||
@@ -411,7 +411,10 @@ uint32_t RoomServerMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
return computeAdaptiveDirectDelay(packet);
|
||||
}
|
||||
|
||||
bool RoomServerMesh::filterRecvFloodPacket(mesh::Packet* pkt) {
|
||||
mesh::DispatcherAction RoomServerMesh::onRecvPacket(mesh::Packet* pkt) {
|
||||
// Determine the request packet's region so sendFloodReply() can echo the same
|
||||
// scope. Runs for every packet (not just floods) so recv_pkt_region is cleared
|
||||
// for direct packets instead of inheriting the last flood's region.
|
||||
if (pkt->getRouteType() == ROUTE_TYPE_TRANSPORT_FLOOD) {
|
||||
recv_pkt_region = region_map.findMatch(pkt, REGION_DENY_FLOOD);
|
||||
} else if (pkt->getRouteType() == ROUTE_TYPE_FLOOD) {
|
||||
@@ -423,7 +426,7 @@ bool RoomServerMesh::filterRecvFloodPacket(mesh::Packet* pkt) {
|
||||
} else {
|
||||
recv_pkt_region = nullptr;
|
||||
}
|
||||
return false;
|
||||
return Mesh::onRecvPacket(pkt);
|
||||
}
|
||||
|
||||
void RoomServerMesh::onAnonDataRecv(mesh::Packet* packet, const uint8_t* secret, const mesh::Identity& sender, uint8_t* data, size_t len) {
|
||||
|
||||
@@ -148,7 +148,7 @@ protected:
|
||||
return _prefs.multi_acks;
|
||||
}
|
||||
|
||||
bool filterRecvFloodPacket(mesh::Packet* pkt) override;
|
||||
mesh::DispatcherAction onRecvPacket(mesh::Packet* pkt) override;
|
||||
|
||||
void onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id, uint32_t timestamp, const uint8_t* app_data, size_t app_data_len) override;
|
||||
void onAnonDataRecv(mesh::Packet* packet, const uint8_t* secret, const mesh::Identity& sender, uint8_t* data, size_t len) override;
|
||||
|
||||
@@ -114,7 +114,7 @@ bool RegionMap::save(const char* path) {
|
||||
}
|
||||
fs_close(&file);
|
||||
LOG_INF("Saved %d regions to %s", num_regions, filepath);
|
||||
return true;
|
||||
return success;
|
||||
}
|
||||
|
||||
RegionEntry* RegionMap::putRegion(const char* name, uint16_t parent_id, uint16_t id) {
|
||||
|
||||
Reference in New Issue
Block a user