Skip to content

Commit

Permalink
Only invalidate unasserted gateways if they are from WiFi radios
Browse files Browse the repository at this point in the history
  • Loading branch information
maplant committed Nov 14, 2023
1 parent f4ebc65 commit a5c6774
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mobile_verifier/src/heartbeats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,21 +496,18 @@ pub async fn validate_heartbeat(
proto::HeartbeatValidity::GatewayNotFound,
))
}
GatewayResolution::GatewayNotAsserted => {
GatewayResolution::GatewayNotAsserted if heartbeat.hb_type == HbType::Wifi => {
return Ok((
cell_type,
None,
None,
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,
};

/*
Expand Down

0 comments on commit a5c6774

Please sign in to comment.