From a5c67746cdd35bfc13f2aa0d081fae28e0075218 Mon Sep 17 00:00:00 2001 From: Matthew Plant Date: Tue, 14 Nov 2023 17:32:27 -0500 Subject: [PATCH] Only invalidate unasserted gateways if they are from WiFi radios --- mobile_verifier/src/heartbeats/mod.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mobile_verifier/src/heartbeats/mod.rs b/mobile_verifier/src/heartbeats/mod.rs index 7a8ba79ec..b45e9c4e9 100644 --- a/mobile_verifier/src/heartbeats/mod.rs +++ b/mobile_verifier/src/heartbeats/mod.rs @@ -496,7 +496,7 @@ pub async fn validate_heartbeat( proto::HeartbeatValidity::GatewayNotFound, )) } - GatewayResolution::GatewayNotAsserted => { + GatewayResolution::GatewayNotAsserted if heartbeat.hb_type == HbType::Wifi => { return Ok(( cell_type, None, @@ -504,13 +504,10 @@ pub async fn validate_heartbeat( proto::HeartbeatValidity::GatewayNotAsserted, )) } - GatewayResolution::AssertedLocation(location) => { - if heartbeat.hb_type == HbType::Wifi { - Some(heartbeat.asserted_distance(location)?) - } else { - None - } + GatewayResolution::AssertedLocation(location) if heartbeat.hb_type == HbType::Wifi => { + Some(heartbeat.asserted_distance(location)?) } + _ => None, }; /*